LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 11-02-2005, 04:17 PM   #1
mmowchenko
LQ Newbie
 
Registered: Oct 2005
Posts: 3

Rep: Reputation: 0
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!
 
Old 11-02-2005, 06:46 PM   #2
scott_R
Member
 
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 746

Rep: Reputation: 31
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.
 
Old 11-02-2005, 07:05 PM   #3
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
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.
 
Old 11-03-2005, 06:46 PM   #4
mmowchenko
LQ Newbie
 
Registered: Oct 2005
Posts: 3

Original Poster
Rep: Reputation: 0
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?
 
Old 11-04-2005, 08:15 AM   #5
Dtsazza
Member
 
Registered: Oct 2005
Location: Oxford, UK
Distribution: Debian Etch (w/ dual-boot XP for gaming)
Posts: 282

Rep: Reputation: 30
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).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/root directory full kpachopoulos Linux - General 6 07-07-2005 01:01 AM
when will heppen if the / directory is full ust Fedora 1 04-13-2005 11:18 PM
/tmp directory is full? Moses420ca Linux - Newbie 13 01-21-2005 08:48 PM
Granting users full internet access!? adham1sa Linux - Networking 3 12-22-2004 07:08 AM
Samba access by Windows users locking out directory access with Konqueror harry_fine SUSE / openSUSE 1 12-18-2004 06:33 AM


All times are GMT -5. The time now is 01:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration