The Arch wiki states to ensure that the .xsession file in your home directory should be executable when configuring xdm

$ chmod 700 ~/.xsession

If I am running my install via a script as root,this command will give only root the necessary permissions. What command can I run to give a user the correct permissions to this file when running as root?

  • 1
    I think you simply need to chown file to user:user instead. May 26, 2019 at 20:14

1 Answer 1


chmod changes the abilties of the file, if it can be executed, read and written. It applies these abilties for three groups (ignoring extended attributes). These groups are user, group and world.

So, chmod lets you say make a file readable, by user. 'User' ni this case is decided by whomever owns the file.

The owner can be changed using chown.

With this in mind, you likely need to chmod the file to have +r (read) set, and it likely needs to be owned by the user who'll be running it.

chmod 700 ~/.xsessions chown user

Replacing 'user' with the username of the user who'll be running the session.

Also note, it's refering to the file by using the 'shortcut' ~, which is replaced by /home/user/, so if you were calling this as root, and your user is called ZR_ you'll need to run:

chmod 700 /home/ZR_/.xsessions chown /home/ZR_/.xsessions ZR_

  • 1
    I ran second line as chown ZR_ /home/ZR_/.xsessions and worked great. Thanks.
    – ZR_
    May 26, 2019 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.