Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-08-2010, 02:33 PM   #1
Registered: Oct 2004
Distribution: Slackware, CentOS
Posts: 135

Rep: Reputation: 15
Group share directory permissions

On our fileserver, we primary use samba to share files to our users, but a few users have to use ssh/sftp to access the file server. In samba we have the shares setup so that permissions are forced to be the correct group owner and group read/write. The problem is those few who access via ssh/sftp. There files do not have the correct permissions. These people are not the most computer savvy, I'm dealing with biologist here. Is there some way to fix this or will I just have to setup a cron job to go through and set permissions periodically?
Old 07-08-2010, 06:33 PM   #2
Registered: Sep 2003
Location: GMT -08:00
Distribution: Ubuntu, RHEL/CentOS, Fedora
Posts: 234

Rep: Reputation: 42
You can use the group sticky bit to stick the proper group and you can set the user's umask to default allow group writing. See "man chmod".

You can also use ACLs and set default ACLs, see "setfacl" and "getfacl".

I've always found that permissions can be a bit of a sticky wicket and once you get one sub-directory which has the wrong permissions, everything else underneath it remains broken so you may need to rely on a cron job. If you do have to do this, I would suggest using "find" and the -group and -perm switches to locate files and directories that done match what's required and then "-exec chgrp <whatever> {} \+" syntax. This will give you the fastest way of correcting files files with the wrong permissions (see "man find".


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
Setting up group permissions for a mounted share stonehurstX11 Linux - General 2 07-06-2010 03:31 PM
Group Permissions on a file or share scucci Linux - Newbie 2 10-17-2009 02:10 PM
how to share files and directory without group and world access Z038 Linux - General 8 08-11-2009 10:49 PM
directory permissions on mounted smb share in fstab glok_twen Linux - Server 2 02-18-2008 06:13 AM
how to set Samba directory / share permissions rwtreke Linux - General 2 02-16-2006 03:24 PM > Forums > Linux Forums > Linux - Server

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

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