Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a raid partition mounted to /data. My samba's homes and public paths are set to /data/home and /data/public. I'm wondering if I should 'chmod 777 /data' so that when a user makes a folder in public, any other user can edit it. I think what I'm asking for is how do I make it so every other directory made in /data cascades so that the user who made it doesn't have to be the user to edit/delete it.
Distribution: Lots of distros in the past, now Linux Mint
You can do it that way, but that last '7' might be a problem, as it would allow anyone (internet users as well) at all to carry out the same actions. In this case, it might be better to create a new group, add the relevant users to that group, then set the permissions to 770, meaning user (owner) and group could use it, but restricting 'other' users.
Depending on the number of users, of course, you may want to look into ldap, to ease things like this, as well as enable your users to work from home, etc.
The problem is that users on your system will have umasks like 022 or 027. 022 means that when they create files they are only writable by themselves, and with 027 they aren't accessible at all by others. You could change the umask to 000 for all your users but this is a very BAD IDEA. It basically means that by default any file your users create (anywhere, including their home directories) will be readable by others.
A better solution is to make a group called 'public' (or whatever you want) and make it the group owner of /data/public and everything in it. Then set groupid in the permissions on the /data/public directory. That way whenever someone creates a file or directory under /data/public it will have group ownership of 'public' and anyone in the group public (add all your users into that group) should be able to access it.
Thanks for the posts guys, just a followup. I put all the created users in a group called data, then I did
chmod 770 /data
chmod 770 /data/public
chmod 770 /data/home
All the users have their own directories in home, but my problem is when I log into say the user 'office' and store a bunch of files in its own directory under home, the user 'family' also has those files in his directory. Any chmod variation to stop this?
Distribution: Debian Etch (w/ dual-boot XP for gaming)
That's rather strange... you're saying that when you put files in /home/office, they automatically appear in /home/family?
Firstly check that the users have separate home directories - you can do this by either outputting the results of your /etc/passwd file (use the command 'cat /etc/passwd | grep "office|family' ), or by logging in as each user, going to their home directory and issuing the command 'pwd'.
If the directories are actually different, then see whether the files are actually copied to family or simply linked - use 'ls -l' on the files both in office's home and family's home.
Let us know the output of both commands; I can say now, I highly doubt this is anything to do with chmod. chmod only modifies who can access files and do what to them, it shouldn't create any kind of mirroring effect (or create anything at all).