LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 10-26-2010, 12:02 PM   #1
splap
LQ Newbie
 
Registered: Oct 2009
Posts: 18

Rep: Reputation: 0
Lightbulb Default Permissions and Sharing with Ubuntu 10.04


Hi,

I'm trying to make a directory ('/home/sales/') that every user in a specified group ('sales') can modify without restraint, but anyone outside of that group can only read.

I've set up the directory to have the permissions 775, but any files created are being created with permissions 755! I've tried setting umask to 002, and still no use.

Can anyone give me any help?

Last edited by splap; 10-26-2010 at 02:56 PM.
 
Old 10-26-2010, 12:09 PM   #2
Expeto
Member
 
Registered: Sep 2010
Posts: 30

Rep: Reputation: Disabled
I use a workaround for a similar problem.

crontab this for every minute,
chmod -R 775 /home/sales/

I would love to know if there is a more elegant way of doing this

Last edited by Expeto; 10-26-2010 at 12:14 PM.
 
Old 10-26-2010, 01:57 PM   #3
splap
LQ Newbie
 
Registered: Oct 2009
Posts: 18

Original Poster
Rep: Reputation: 0
I thought of that too, but to be honest I'm really trying to avoid that


Thanks for the help though
 
Old 10-26-2010, 04:16 PM   #4
splap
LQ Newbie
 
Registered: Oct 2009
Posts: 18

Original Poster
Rep: Reputation: 0
Is there really no one that can help me?

Can't I change a setting somewhere? Or write a new script somewhere? Something?
 
Old 10-26-2010, 05:42 PM   #5
GazL
Senior Member
 
Registered: May 2008
Posts: 3,392

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
The umask 002 should be working (assuming you're not doing anything daft like trying to use permissions on a filesystem type like FAT that doesn't support them).

What do you see if you do a
Code:
cd /home/sales
umask 002
touch testfile
ls -l testfile
?

If that works as expected, then it must be down to how the files are being created.

By the way, if you haven't already then you probably want to do a
chown root:sales /home/sales
chmod g+s /home/sales

in order to enforce the setting of the correct group on all new files/directories created under that directory.
 
Old 10-26-2010, 08:33 PM   #6
splap
LQ Newbie
 
Registered: Oct 2009
Posts: 18

Original Poster
Rep: Reputation: 0
(I'm on a different computer)

I think that umask is working. But it's not for my computer, and the user who owns it can't use the terminal, nor is it really an option to teach them. Is there a way to get it to do this automatically?
 
Old 10-27-2010, 04:12 PM   #7
GazL
Senior Member
 
Registered: May 2008
Posts: 3,392

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Not reliably no. With the exception of the set-group-id on directories, the UNIX permissions system doesn't do inheritance in the same way that the NTFS permission system does. The user or program creating the file is responsible for setting the permissions on it appropriately.

You might want to read up on POSIX ACLs (man 5 ACL), but IMO they're a pain to manage and more trouble than they're worth. The cron solution already suggested is probably your easiest option.
 
  


Reply

Tags
default, permissions, sharing, ubuntu, users


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
How do I *automatically* set alternative default folder permissions in Ubuntu? S.Lowhand Linux - Desktop 21 11-17-2009 03:51 AM
Problem setting umask and default file permissions on ubuntu 7.04 server with xfs a2brute Linux - Server 1 05-22-2008 04:57 AM
FC5 / Ubuntu home directory sharing without sharing session information cdhgee Fedora 1 07-26-2006 05:47 PM
Interrupt sharing by default? halfpower *BSD 0 08-11-2005 01:24 PM
Windows sharing permissions bakuretsu Linux - Networking 1 10-13-2002 01:21 PM


All times are GMT -5. The time now is 12:55 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration