VSFTPD files/folders uploaded by OSX machines can only be deleted by OSX machines
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
VSFTPD files/folders uploaded by OSX machines can only be deleted by OSX machines
I have a VSFTPD server, and we primarily use PCs. We have a few Mac OSX users who upload folders of files to us, but when we use FTP clients from the PC, we cannot delete the folders. If a Mac ftp client connects, it can delete them. If I log on to the server through the CLI, i can delete the folders as root.
when I try to delete the folder through Filezilla from a PC, all i get back is this:
Command: RMD FolderName
Response: 550 Remove directory operation failed.
Any ideas what might be causing this? When I do a ll on the directory, they have the same permissions as everything else (i.e. folders we can delete). I dont know if its a setting in their FTP clients and its just a coincidence they're all Macs or what.
What do the permissions and ownership of the files look like? It is possible that the client may be doing something to the permissions or ownership that may be unexpected.
Some items that may help if this is the issue:
Quote:
From the vsftpd.conf man page:
chown_uploads
If enabled, all anonymously uploaded files will have the ownership changed to the user specified in the setting chown_username. This is useful from an administrative, and perhaps security, standpoint.
chown_upload_mode
The file mode to force for chown()ed anonymous uploads. (Added in v2.0.6).
Default: 0600
chown_username
This is the name of the user who is given ownership of anonymously uploaded files. This option is only relevant if another option, chown_uploads, is set.
Default: root
Thanks for the reply. We don't allow anonymous uploads. and the permissions match with folders that we can delete, but the owner is obviously different (since diff people are uploading). all the users belong to the same group as well.
When I do a ls on the folders, i compared it to ones that we could delete, and they appear to be the same, other than the different owner obviously, but all users belong to same group.
Yes, group is the same on everything. What logs from the server would i look in, i posted the only message i get from the ftp client in the original post.
Look at your vsftpd logs and post information from there. Your error indicates that you are trying to remove a directory and not files. Output from ls -alh might be helpful as well.
When I do the ls -alh all the directories (ones that we can and cannot delete) have this drwxrwxr-x with the user being the user who uploaded it, and all belonging to the same group.
When i try to delete one of the folders that was uploaded from a Mac, in my ftp client I get the 550 Remove directory operation failed. I tailed the vsftpd.log and nothing was logged.
I am at a loss right now with the issue that you are having. Hopefully someone else may pipe in and have something to add. I have yet to run into the problem or similar problem that you are having now.
I think I might have stumbled onto the cause of this. by doing a ll -alh within the folders, i noticed inside of them was a .DS_Store file with -rw-rw-r-- on it. I went to the FTP server and deleted that, then I could delete the folder from my FTP client on the PC.
Now if i can just figure out how to stop those files from being included when they FTP
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.