You are not logged in.

#1 2014-09-06 22:29:48

Nordic89
Member
Registered: 2014-05-07
Posts: 49

My permissions seem to be borked, how do I fix this?

I made a complete backup of the system with "rsync -aAXv", and set up my encryption. After restoring everything, and booting up and trying to login, openbox didn't want to start, and "startx" didn't work either. After a bit of testing I noticed that I didn't have the permissions to create the necessary temporary files and therefore x and openbox didn't start.

I just ran "ls -l" on /home/john/.Xresources

"-rw------- 1 john john 54 Sep  6 11:10 /home/john/.Xauthority"

When I try to run openbox, I get this:

"Openbox-Message: Unable to make directory '/home/john/.cache/openbox': Permission denied

Openbox-Message: Unable to make directory "/home/john/.cache/openbox/sessions": Permission denied

Openbox-Message: Failed to open the display from the DISPLAY environment variable."

Where does the problem come from?

Can using pcmanfm to copy files (ctrl-c + ctrl-v) cause this? I first had to copy the backup from my external harddrive (ext4) to my laptop (btrfs) and then back before I restored the files on my desktop pc.

Last edited by Nordic89 (2014-09-07 10:10:01)

Offline

#2 2014-09-09 10:57:14

justin-8
Member
From: Queensland, Australia
Registered: 2013-06-18
Posts: 53

Re: My permissions seem to be borked, how do I fix this?

What are the permissions for each folder in the path for '/home/john/.cache/openbox'?

I'm assuming all your rsync commands were run as root?

If you did actually copy your backup to/from devices using pcmanfm that is most likely what has broken it. If it wasn't copied as root it won't have set file ownership correctly, and some permissions would also require root (sticky bits and such)

Offline

#3 2014-09-13 17:09:15

rgb-one
Member
Registered: 2013-09-15
Posts: 19

Re: My permissions seem to be borked, how do I fix this?

When copying files/folders with root privilages, root becomes the owner of these files/folders. It may be that some of the directories and files you copied are owned by the root user/group and not user/group john. What you could do is change the permissions of all files in the directory recursively so that all files are owned by user/group john. This can be done using 'chown'. Login as root user or if you have administrative privilages, use 'sudo' followed by the below command to change the permissions of all the files in the directory "john" recursively:

# chown -R john:john /home/john

What this does is recursively (-R) change the user:group (ownership) of all directories and its content to john:john, thus allowing that user full acces to all files in that directory.

To learn more about chown and user permissions:

$ man chown

Arch Wiki: File permissions and attributes

Last edited by rgb-one (2014-09-13 17:10:48)

Offline

#4 2014-09-13 19:05:57

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: My permissions seem to be borked, how do I fix this?

You used rsync to make the backup; but restored your backup with your filemanager? Why? It might very well be that your file manager didn't preserve owner and other attributes. I'd restore again; using `rsync -a`.

Offline

#5 2014-09-14 01:52:00

justin-8
Member
From: Queensland, Australia
Registered: 2013-06-18
Posts: 53

Re: My permissions seem to be borked, how do I fix this?

@rgb-one: copying, yes. copying uses the user's default umask/owner/group. rsync as root using -a will preserve all ownership (group/user) as well as permissions.

Offline

Board footer

Powered by FluxBB