[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: file creation permissions



Quoting Michael Kahle <michael.kahle@scc-wi.com>:

> Hello,
> 
> How would I force a newly created file by userA to have the permissions set
> automatically to userB, groupB 775?
> 
> What I am trying to do is when a user uploads a file to our ftp server
> (proftpd) it does not create the file using their username as the group and
> owner of the newly created file.  I would like instead if they uploaded to
> dirA it to have a predefined owner and group for the file created.  If they
> upload to dirB a different owner and group etc.  Any thoughts?  Please
> point
> me to documentation, examples, etc.  I do not know where to start with
> this.

I don't know if its possible to modify the ownership of a newly created file.
He who creates, becomes owner. You can use the sgid bit to modify the group 
permission to follow that of the parent directory.
You may want to re-think your upload plan. Perhaps there is a way to accomplish 
what you want with the existing rules of linux permissions.
Why do you want to change ownerships?

Mike




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/



Reply to: