Sometimes your system may display an error code indicating an error in the ubuntu revocation authorization file .xauthority. This error can be caused by a number of reasons.

I have another answer to a concern that bothered me before I raised this issue. As I later guessed, the problem is considered a bug in Fedora OS and its derivatives. If the accepted answer does not indicate a problem and / or you cannot use Fedora, RedHat, Korora, etc., this will not be reported.

As slm said, running strace will probably indicate a specific problem, but choosing this error will output differently:

  list $ strace xauth ...  stat64 ("/ home / USER / .0xbff23280) xauthority-c", = -1 ENOENT (not the same file or directory)  open ("/ home / USER / .Xauthority-c", O_WRONLY | O_CREAT | O_EXCL, 0600) = -1 EACCES (authorization denied)  rt_sigprocmask (SIG_BLOCK, [CHLD], [], 8) implies 0  rt_sigaction (SIGCHLD, NULL, SIG_DFL, [], 0, 8) = 0  rt_sigprocmask (SIG_SETMASK, [], NULL, 8) = 0 Nano-sleep (2, 0, 0xbff232c8) = 0  open ("/ home / USER / .Xauthority-c", O_WRONLY | O_CREAT | O_EXCL, 0600) = -1 EACCES (authorization denied)  rt_sigprocmask (SIG_BLOCK, [CHLD], [], 8) means 0  rt_sigaction (SIGCHLD, NULL, SIG_DFL, [], 0, 8) = 0  rt_sigprocmask (SIG_SETMASK, [], NULL, 8) = 0 Nano-sleep (2, 0, 0xbff232c8) = 0  open ("/ home / USER / .O_WRONLY | O_CREAT | O_EXCL, xauthority-c", 0600) = -1 EACCES (authorization denied)  ... 

error in locking authority file .xauthority ubuntu

For clarity, this EACCES return value denies authorization. This is often different from theUser slm’s emails, the best place he had an EEXIST return marketer means the file exists. So all the return code for EACCES is obviously, the first thing you are currently checking is: are my personal permissions set, probably so I can write as my home directory? You must first check if the home directory write flag is enabled for the home user. If you do this, you may fall prey to the error described below.

error in locking authority file .xauthority ubuntu

After doing a Google search together, I was confident enough to find someone with a similar problem. This resulted in an error message for me and Fedora. For those who care, read the information on it: https://bugzilla.redhat.com/show_bug.cgi?id=772992

  # confirm you're not crazylist $ xauth  / usr / bin / xauth: close timeout in authority file /home/USER/.Restorecon xauthority# Reset everything with Return$ / sbin / restorecon -v -volts /home/USER/.Xauthority$ / sbin / restorecon -v -v -R / home / USER /# Quit the computer's remote help systemoutput $ 

If you are going to use SSH again, keep in mind that this advantage will be fine and you will be in the market You will be able to successfully broadcast your X session.


EDIT (and New Alternative Workarounds):

To be as complete as possible, other users actually stated in a bug report that your current fix above did not work for them – it did, which might work for me. Another attempt to work around the problem could have been (I have not personally tested this workaround):

  # setsebool -P use_nfs_home_dirs 1 

Someone is putting something in GDM that I have no idea about. If that means to you, I recommend that you read the BugZilla article and see if you care about its comments.

If you try to establish an SSH connection, you will see an error similar to the following in the location log

/ usr / X11R6 / bin / xauth: error in the revocation authorization archive $ HOME / .Xauthority

This problem usually occurs for several reasons

  • Not enough disk space. If your user has an allocated hard disk quota or if you have a large hard disk, program xauth will not be able to write to the .Xauthority file. Try to free up disk space on your system.
  • Invalid file permissions: file permissions for .Xauthority must be 400 (read / write and users ONLY). Any other matching file forces the program to authenticate to reject the file.

As a final step, you can try deleting the .Xauthority file entirely. The file can be recreated with ssh in the following log

When trying to establish an SSH connection, if you see an error in addition to the following in the main status log

/ usr / X11R6 / bin / xauth: error locking the organization file $ HOME / .Xauthority

This issue usually occurs for one of the following reasons

  • No space on CD or DVD: If your user has a disk quota, or if your disk is likely full, the xauth program will not be able to write to the exact .Xauthority file. Trywant to free up empty space in the system.
  • File permissions may be incorrect: file permissions for .Xauthority must be 400 (read-write and for users ONLY). Any other permission on the data file will result in the file being rejected by xauth support.

As a best measure, you can try deleting the .Xauthority file entirely. The file can be recreated the next time your family connects to ssh

If you start connecting using ssh, you should see an error similar to the following in the history log

  • Not enough disk space: If your carrier has a disk quota or if the disk is full, the xauth scheme cannot be propagated in the .Xauthority file. Try to free up space on your system.
  • Invalid file permissions: file permissions for .Xauthority must be 600 (read and write, for users ONLY). Any other permission on the file will cause xauth to reject the file

As a last resort, you can define that The .Xauthority file has been completely removed. The file will be recreated on next login with ssh