I am trying to setup a wingftp server on Linux Redhat 5.4.
How can you change the permission and ownership when uploading files/creating directories?
The out-of-the box settings of wingftp is to create files with 666 and directories with 777 permission
and the owner of the files is root. With the owner "root" of the files I could somehow live, but the
world-writable part is pretty scary on a unix system.
As a workaround I have tried to use "Execute Program" with OnFileUploaded and OnDirCreated
to fix the permission/ownership. This works for OnFileUploaded but with OnDirCreated I don't
know how to pass the directory name to the external program.
Maybe there is a nice way to fix this problem.
default file/directory permission and owner
-
- Site Admin
- Posts: 2087
- Joined: Tue Sep 29, 2009 6:09 am
Re: default file/directory permission and owner
I think its our fault, we have not executed "chmod" after creating file/dir.
Next version will correct this bug, for creating files with 644 and directories with 755 permission.
Next version will correct this bug, for creating files with 644 and directories with 755 permission.
-
- Posts: 3
- Joined: Mon Nov 07, 2011 4:59 pm
Re: default file/directory permission and owner
Is there any possibility to set default chmod?
I'd like to use 664 and 775 instead of default's 644 and 755 but can't find any way to do this...
I need it to be able for users of some group to be able to read/write files to ftp's subfolders using nfs mount
For a default group I have found a solution to set a sticky bit on root folder, and later all files and subfolders are created with the same group, but for permissions it doesn't work...
I'd like to use 664 and 775 instead of default's 644 and 755 but can't find any way to do this...
I need it to be able for users of some group to be able to read/write files to ftp's subfolders using nfs mount
For a default group I have found a solution to set a sticky bit on root folder, and later all files and subfolders are created with the same group, but for permissions it doesn't work...
Last edited by mlesin on Tue Nov 08, 2011 11:03 am, edited 1 time in total.
-
- Site Admin
- Posts: 2087
- Joined: Tue Sep 29, 2009 6:09 am
Re: default file/directory permission and owner
You can use a simple lua script for the event OnFileUploaded:
Code: Select all
os.execute("chmod 664 '%PathName' ")
-
- Posts: 3
- Joined: Mon Nov 07, 2011 4:59 pm
Re: default file/directory permission and owner
it says events are not available in secure edition.
I think it's not that task when events are really needed, and purchasing a corporate edition just for that is like using a microscope as a hammer =)
I think it would be great to have some variable in preferences about default file rights (and possibly file owner/group)
I think it's not that task when events are really needed, and purchasing a corporate edition just for that is like using a microscope as a hammer =)
I think it would be great to have some variable in preferences about default file rights (and possibly file owner/group)
-
- Site Admin
- Posts: 2087
- Joined: Tue Sep 29, 2009 6:09 am
Re: default file/directory permission and owner
OK, we will add a feature "Customized chmod permission" in the next release.
-
- Posts: 3
- Joined: Mon Nov 07, 2011 4:59 pm
Re: default file/directory permission and owner
is there any progress on this?
-
- Site Admin
- Posts: 2087
- Joined: Tue Sep 29, 2009 6:09 am
Re: default file/directory permission and owner
Yes, we will add this feature in the version 4.0.6.