LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   View other users files on my system (https://www.linuxquestions.org/questions/linux-software-2/view-other-users-files-on-my-system-4175464137/)

xmrkite 05-30-2013 01:42 PM

View other users files on my system
 
Hello, I have a linux box setup with a few regular users. I want to be able to go in and view their files for backup purposes and whatnot, but not require sudo everytime I want to go into their folders.

Is there any way that I can do this without using sudo/root?

I'm using lubuntu 12.10.

-Thanks

dayid 05-30-2013 02:39 PM

Most often read access for others exists in many systems' default umask settings.

Otherwise, you'll either need to have permissions set for each user to where your user can access their files (either using the other permissions - or creating a group that they/you are members of and set group permissions properly).

If you can't set permissions for your user to access their files, you will need to use root.

xmrkite 05-30-2013 03:46 PM

It worked. I simply added my user to that group as a secondary group. Now I can view all the files.

Thanks

John VV 05-30-2013 04:32 PM

They now can read your files too, so......

Z038 05-30-2013 05:14 PM

Quote:

Originally Posted by John VV (Post 4962357)
They now can read your files too, so......

John, think that through... if usera and userb are in different groups, then adding userb's group as a subgroup for usera allows usera access to userb's directories and files as governed by the group permission bits. But since userb does not have usera's group as a secondary group, userb has only access to usera's files as governed by the world permission bits.

To the OP, dayid touched on this. Even though you added your user's group to your account as a subgroup, your access to their files is governed by the group permission bits they have set on their files and directories. They can change these at any time and prevent you from accessing their files.

For example, if they set umask 077 in their login profile (~/.profile) and non-login interactive shell profile (for example for the bash shell, ~/.bashrc), then all files and directories they create will have the read, write, and execute bits in the group and world permission bits turned off. You won't be able to access their files and directories even if you have added their group to your user account as a subgroup.

xmrkite 05-30-2013 11:14 PM

So then what do I do? In the windows world, the administrator can read everyone's files no matter how they save them. Do we have something like that in linux?

Z038 05-30-2013 11:33 PM

For Linux, the administrator account is root.

rtmistler 06-01-2013 06:11 PM

You should be using root, and I don't understand why you started with the restriction to not do that in the first place. If you try to manipulate groups, then you may end up allowing access to files which you didn't intend to.


All times are GMT -5. The time now is 10:18 PM.