LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Full access directory for all users (https://www.linuxquestions.org/questions/linux-newbie-8/full-access-directory-for-all-users-379359/)

mmowchenko 11-02-2005 04:17 PM

Full access directory for all users
 
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.

Much thanks in advance!

scott_R 11-02-2005 06:46 PM

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.

tkedwards 11-02-2005 07:05 PM

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.

mmowchenko 11-03-2005 06:46 PM

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?

Dtsazza 11-04-2005 08:15 AM

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).


All times are GMT -5. The time now is 09:40 PM.