Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Setting default directory file permissions and ownership help Post 302485271 by v_greg on Tuesday 4th of January 2011 06:36:40 PM
Old 01-04-2011
For example of what I'm trying to do...

Code:
root@www10 [/home/internal/employee]# pwd
/home/internal/employee
root@www10 [/home/internal/employee]# ls -l
total 56
drwxr-xr-x  7 internal internal 4096 Jan  4 07:53 ./
drwx--x--x 12 internal internal 4096 Jan  4 07:13 ../
drwx--x--x  2 blake    internal 4096 Jan  4 07:13 blake/
drwx--x--x  2 damien   internal 4096 Jan  4 07:12 damien/
drwx--x--x  2 greg     internal 4096 Jan  4 11:14 greg/
drwx--x--x  2 seth     internal 4096 Jan  4 07:17 seth/
drwxrwx--x  6 internal internal 4096 Jan  4 08:04 shared/
root@www10 [/home/internal/employee]# cd seth
root@www10 [/home/internal/employee/seth]# touch testfile.txt
root@www10 [/home/internal/employee/seth]# ls -l
total 20
drwx--x--x 2 seth     internal 4096 Jan  4 15:58 ./
drwxr-xr-x 7 internal internal 4096 Jan  4 07:53 ../
-rw-r--r-- 1 root     root        0 Jan  4 15:58 testfile.txt

It's easy to su and chmod when using command line, but we're mounting our SSH connection to the server as a local drive. If I create a file in seth's directory, it is given the ownership of root rather than of Seth.

I've figured out group permissions and being able to make the group by putting turning the group sticky bit on, any files or directories created keep the group ID.

I would rather be able to inherit the ownership of the directory than give group r+w permissions.

---------- Post updated at 04:36 PM ---------- Previous update was at 04:32 PM ----------

Quote:
Originally Posted by cjcox
This is actually harder than it seems. Usually the only way to achieve this is via a front end in front of the filesystem. Once such frontend is something like Samba... and you can achieve something like what you are wanting using Samba. But there are likely other frontends (perhaps FUSE based??) that might help as well.

On the opposite end, some systems (filesystems) support some kind of extended ACL feature... it too, might allow you to do something like what you are looking for.

But in general, you can't do what you are wanting automatically by default on most *ix systems.
Thanks - I'll look into the FUSE based idea. We're using FUSE and Macfusion for mounting the SSH drive remotely already on OSX, so maybe I'll look into it further, maybe there's a tweak we can make there. Otherwise I guess it's just a matter of creating extra groups and allowing group read and write access and setting a umask and sticky bit for the GID.
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Setting Default Permissions for Files

Hi, I am setting up an area on a unix server where multiple people will be editing web pages. Can anyone tell me how to set it up the directory and subdirectories so that when a user creates a new file, it defaults to permissions of 664 or 775? I've tried using umask but from what I can... (1 Reply)
Discussion started by: robbieg
1 Replies

2. UNIX for Dummies Questions & Answers

copy directory without changing ownership setting

hi currently i am migrating some directories over to a new server. is there any command (rcp or ftp or anything) for me to use without changing the ownership and permission of the directory? i am copying some directories from unix machine to linux machine. what is the exact command? thanks... (2 Replies)
Discussion started by: legato
2 Replies

3. OS X (Apple)

disc ownership permissions

Hi all, I am running OSX 10.4.11 on a G4 Sawtooth with 3 internal hard drives. Recently while setting up new user accounts for family members, I foolishly assigned 'No Access' to 2 drives other than the boot drive. Naturally, they now don't appear on the desktop. I tried to fix... (1 Reply)
Discussion started by: les51
1 Replies

4. UNIX for Dummies Questions & Answers

Help setting up file permissions

Hi, I'm in the process of writing a system (in Java) where a user can register to become a member of a website. When they register, a collection of directories and files get created by the application. For example if a user with the name 'fred' registered they would get the following drwxr-xr-x... (0 Replies)
Discussion started by: andrewpmoore
0 Replies

5. Shell Programming and Scripting

Setting default permissions without umask or cron jobs

I've got a number of people sending files to me in different directory structures, and users on many different groups who need access to these incoming paths. My problem is that umask assumes a default of 666 for files. No execute bit, meaning that my users can't even see the incoming folders.... (2 Replies)
Discussion started by: Karunamon
2 Replies

6. UNIX for Dummies Questions & Answers

Setting file permissions dynamically

I'm working in a linux server where wrappers are executed by multiple users of different groups. The log and output files are created with 554 permissions by default. This is stopping other users to run the wrappers unless the log and output files are deleted or given 777 permission. Setting SUID... (1 Reply)
Discussion started by: praveenpa
1 Replies

7. Solaris

How to set multiple ownership permission on a file/directory?

Hi, Any ideas to set multiple ownership permission on a file/directory on Solaris? I need a folder to have multiple ownership on the 2 nodes servers. The 2 nodes servers require to mount a SMBFS with different user ID. Please assist. Thanks. (6 Replies)
Discussion started by: freshmeat
6 Replies
xfs_estimate(8) 					      System Manager's Manual						   xfs_estimate(8)

NAME
xfs_estimate - estimate the space that an XFS filesystem will take SYNOPSIS
xfs_estimate [ -h? ] [ -b blocksize ] [ -i logsize ] [ -e logsize ] [ -v ] directory ... DESCRIPTION
For each directory argument, xfs_estimate estimates the space that directory would take if it were copied to an XFS filesystem. xfs_esti- mate does not cross mount points. The following definitions are used: KB = *1024 MB = *1024*1024 GB = *1024*1024*1024 The xfs_estimate options are: -b blocksize Use blocksize instead of the default blocksize of 4096 bytes. The modifier k can be used after the number to indicate multiplica- tion by 1024. For example, xfs_estimate -b 64k / requests an estimate of the space required by the directory / on an XFS filesystem using a blocksize of 64K (65536) bytes. -v Display more information, formatted. -h Display usage message. -? Display usage message. -i, -e logsize Use logsize instead of the default log size of 1000 blocks. -i refers to an internal log, while -e refers to an external log. The modifiers k or m can be used after the number to indicate multiplication by 1024 or 1048576, respectively. For example, xfs_estimate -i 1m / requests an estimate of the space required by the directory / on an XFS filesystem using an internal log of 1 megabyte. EXAMPLES
% xfs_estimate -e 10m /var/tmp /var/tmp will take about 4.2 megabytes with the external log using 2560 blocks or about 10.0 megabytes % xfs_estimate -v -e 10m /var/tmp directory bsize blocks megabytes logsize /var/tmp 4096 792 4.0MB 10485760 % xfs_estimate -v /var/tmp directory bsize blocks megabytes logsize /var/tmp 4096 3352 14.0MB 10485760 % xfs_estimate /var/tmp /var/tmp will take about 14.0 megabytes xfs_estimate(8)
All times are GMT -4. The time now is 12:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy