Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.