0

I've spent hours searching for an answer to this problem before deciding to create an account and ask myself:

OS: Ubuntu 18.04

I have a folder named "servers"

Inside this folder, files are generated and edited by a process under the user "pufferd" (game server powered by PufferPanel)

I wish to allow other users to modify, create, and delete files within this folder through FTP (I do not wish to use the SFTP provided by PufferPanel)

However, everything I've found and tried has failed to allow a psuedo "dual ownership" of the folder.

I've tried changing permissions, I've tried setting the owner-group of the folder, it's seemingly impossible to allow both users to create files and be interchangeable without any permission issues whatsoever.

Files uploaded through the FTP user are read-only to "pufferd"

Files created by "pufferd" are read-only to the FTP user.

What is the simplest solution to this? Ideally all files in the folder, regardless of owner or creation origin (server-made, ftp uploaded, or other) are readable, writable, and executable by each user with folder access.

1

There is no such thing as dual ownership in Linux.
You will need to either put both users in one group and add access rights for the group, or allow all users (=others) to access the files.

To set the rights for newly created files, you can use Access Control Lists (acl) to modify (-m) the default (-d) access rights:

setfacl -d -m g:groupname:rwx /path/to/servers

I would actualy not use rwx but rwX, meaning folders can be executed (7), and files will not (6).

You could also allow "others" to access all files:

setfacl -d -m o::rwX /path/to/servers

Default means, all new files and directories will gain these rights. This does not affect files already in place.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.