Root directory permission when creating user from admin inte

Please post here if you have problems in using Wing FTP Server.
Post Reply
fred9176
Posts: 23
Joined: Mon Jul 02, 2012 9:29 am

Root directory permission when creating user from admin inte

Post by fred9176 »

Hi,

It seems that wen we create a new user with a new directory in the web admin interface, the folder is created with 755 permissions ?

Is there anyway to set the default permissions to 775 ?

I changed the default permissions in Server / Settings /General settings / Default permissions, but this seems to be only applied when users are uploading new files and folders in tge existing root directory.

For some users, we use the API and adding os.execute("chmod 775 myfolder") after c_Mkdir works fine (as suggested in this forum), but I also need this behaviour when creating users through the web interface.

I'm using WingFTP 4.3.8 on Debian Wheezy.

Thank you for your help,

Regards,

Fred
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Root directory permission when creating user from admin

Post by FTP »

You can set the default folder permissions under "Server > Settings > General Settings > Miscellaneous".
fred9176
Posts: 23
Joined: Mon Jul 02, 2012 9:29 am

Re: Root directory permission when creating user from admin

Post by fred9176 »

Hi,

Thank you for your answer.

However, as I said in my post, this is already configured and doesn't work to set default permission from admin interface when adding a new directory to a user. It only works when user is uploading files or creating directories when logged through ftp.

Regards,

Fred
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Root directory permission when creating user from admin

Post by FTP »

OK, maybe you can modify the file "webadmin/admin_mkdir.html", replace this line:

local result = c_MkDir(fullpath)

into:

local result = c_MkDir(fullpath)
os.execute("chmod 775 "..fullpath)
fred9176
Posts: 23
Joined: Mon Jul 02, 2012 9:29 am

Re: Root directory permission when creating user from admin

Post by fred9176 »

Thank you, it works fine with this piece of code :-)

Would it be possible to add it in a future release (using the default parameters specified in General options) ?

Regards,

Fred
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Root directory permission when creating user from admin

Post by FTP »

I think you can modify it by yourself, because it is a personal requirement.
fred9176
Posts: 23
Joined: Mon Jul 02, 2012 9:29 am

Re: Root directory permission when creating user from admin

Post by fred9176 »

Yes, that's what I did, but this modification will be overwritten on each upgrade.
Post Reply