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_growfs(8)						      System Manager's Manual						     xfs_growfs(8)

NAME
xfs_growfs, xfs_info - expand an XFS filesystem SYNOPSIS
xfs_growfs [ -dilnrxV ] [ -D size ] [ -e rtextsize ] [ -L size ] [ -m maxpct ] [ -t mtab ] [ -R size ] mount-point xfs_info [ -t mtab ] mount-point DESCRIPTION
xfs_growfs expands an existing XFS filesystem (see xfs(5)). The mount-point argument is the pathname of the directory where the filesystem is mounted. The filesystem must be mounted to be grown (see mount(8)). The existing contents of the filesystem are undisturbed, and the added space becomes available for additional file storage. xfs_info is equivalent to invoking xfs_growfs with the -n option (see discussion below). OPTIONS
-d | -D size Specifies that the data section of the filesystem should be grown. If the -D size option is given, the data section is grown to that size, otherwise the data section is grown to the largest size possible with the -d option. The size is expressed in filesystem blocks. -e Allows the real-time extent size to be specified. In mkfs.xfs(8) this is specified with -r extsize=nnnn. -i The new log is an internal log (inside the data section). [NOTE: This option is not implemented] -l | -L size Specifies that the log section of the filesystem should be grown, shrunk, or moved. If the -L size option is given, the log section is changed to be that size, if possible. The size is expressed in filesystem blocks. The size of an internal log must be smaller than the size of an allocation group (this value is printed at mkfs(8) time). If neither -i nor -x is given with -l, the log contin- ues to be internal or external as it was before. [NOTE: These options are not implemented] -m Specify a new value for the maximum percentage of space in the filesystem that can be allocated as inodes. In mkfs.xfs(8) this is specified with -i maxpct=nn. -n Specifies that no change to the filesystem is to be made. The filesystem geometry is printed, and argument checking is performed, but no growth occurs. See output examples below. -r | -R size Specifies that the real-time section of the filesystem should be grown. If the -R size option is given, the real-time section is grown to that size, otherwise the real-time section is grown to the largest size possible with the -r option. The size is expressed in filesystem blocks. The filesystem does not need to have contained a real-time section before the xfs_growfs operation. -t Specifies an alternate mount table file (default is /proc/mounts if it exists, else /etc/mtab). This is used when working with filesystems mounted without writing to /etc/mtab file - refer to mount(8) for further details. -V Prints the version number and exits. The mount-point argument is not required with -V. xfs_growfs is most often used in conjunction with logical volumes (see md(4) and lvm(8) on Linux). However, it can also be used on a regu- lar disk partition, for example if a partition has been enlarged while retaining the same starting block. PRACTICAL USE
Filesystems normally occupy all of the space on the device where they reside. In order to grow a filesystem, it is necessary to provide added space for it to occupy. Therefore there must be at least one spare new disk partition available. Adding the space is often done through the use of a logical volume manager. EXAMPLES
Understanding xfs_info output. Suppose one has the following "xfs_info /dev/sda" output: meta-data=/dev/sda isize=256 agcount=32, agsize=16777184 blks = sectsz=512 attr=2 data = bsize=4096 blocks=536869888, imaxpct=5 = sunit=32 swidth=128 blks naming =version 2 bsize=4096 log =internal bsize=4096 blocks=32768, version=2 = sectsz=512 sunit=32 blks, lazy-count=1 realtime =none extsz=524288 blocks=0, rtextents=0 Here, the data section of the output indicates "bsize=4096", meaning the data block size for this filesystem is 4096 bytes. This section also shows "sunit=32 swidth=128 blks", which means the stripe unit is 32*4096 bytes = 128 kibibytes and the stripe width is 128*4096 bytes = 512 kibibytes. A single stripe of this filesystem therefore consists of four stripe units (128 blocks / 32 blocks per unit). SEE ALSO
mkfs.xfs(8), md(4), lvm(8), mount(8). xfs_growfs(8)
All times are GMT -4. The time now is 09:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy