Running Xubuntu 14.04. I have several user accounts set up as "desktop users", but when they are logged in, they are unable to open ANY files in their HOME folder. Error messages vary, but typically indicate that access is denied or user does not have permission. When I am logged in on my account (as administrator) I have no problem accessing files in my HOME folder. Any ideas? I am new to Linux.
Users should own their own files.
Open a terminal with CTRLALTT or your preferred method
issue the command
sudo chown -R *username* */path/name* where username is the name of the user you want to give ownership to and /path/name is the path to their home directory. This should resolve the vast majority of your issues.
sudo chown -R joe /home/joe
Once you have completed this task for all users they will be able to access all the files in (and under) their homes.
for more detail see
here's an example of what you might see with the command
ls-l which was requested of you.
You'll note the permissions bits in the far left column
d indicates a directory
the 1st letter is d if it's a directory, or - if it's not
r indicates read permission a - here means that permission doesn't exist (denied)
w indicates write permission a - here means that permission doesn't exist (denied)
x indicates execute permission a - here means that permission doesn't exist (denied)
these 3 are broken up into 3 sets for User, Group, and Others
The User is the owner of the files, Group is everyone belonging to the listed group (in this case the owners group) and Others is everyone else without exclusion. Unless your network is very safe and all users are trusted you need to be very careful with the Others bits.
The next field is the number of links, this is followed by the name of the owner and name of the group referred to by the aforementioned bits, then the file size, date, and filename (or directory name if it starts with a d as previously explained)
You'll note that there are 2 directories in the image above. (both start with d)
You'll note that lost+found is a directory, owned by user root of the root group which only root (the owner) has access to. That access is complete, and unrestricted in any way for user root. No other user has access to this even if they belong to the group root. you'll note the bits for group and others are all --- (or = 0)
The other directory is the home of user tvbox who owns it. tvbox (the owner) has rwx permission (complete, unrestricted). members of the group tvbox who are not the user tvbox do not have write access but can otherwise see and enter the directory. Others can also see and traverse the directory. I can change that with the chmod command. As I dont want those that aren't in the tvbox group to have access I'll issue the command
chmod o-rx tvbox/ to change only the directory access or
chmod -R o-rx tvbox/ to remove read and execute permissions the the tvbox folder and all files and folders within it.
After running one of the above th tvbox directory looks like this:
drwxr-x--- 61 tvbox tvbox 12288 Feb 22 17:12 tvbox
As you can see the permissions for others are all denied (non-existent)
We can change the permissions for the group by using a g in place of the o or the user (owner) buy using a u in that location you can change them for everyone at once by stringing them together, for instance
chmod ugo+rwx filename would give full access to the user, the group and all others. (illustrative - not what you normally want) Changing to a - from a + would remove the permissions
So u = user, g = group and o = others, r = read, w = write and x=execute There's also a way to use chmod numerically. 4=read 2=write and 1=execute and you can add the numbers to obtain the desired result. chmod 776 filename would give full access to owner and group and deny others execute permission while allowing read and write. This is great shorthand for system adminstrators who need to rapidly change permissions on numerous files and directories.
The -R means recursive and it can be very dangerous to use it with any command if you aren't sure exactly what you are doing.