LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   VSFTPD files/folders uploaded by OSX machines can only be deleted by OSX machines (https://www.linuxquestions.org/questions/linux-server-73/vsftpd-files-folders-uploaded-by-osx-machines-can-only-be-deleted-by-osx-machines-907810/)

anon091 10-12-2011 01:02 PM

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.

grim76 10-12-2011 03:53 PM

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


anon091 10-12-2011 04:01 PM

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.

grim76 10-14-2011 12:05 PM

What are the permissions on the files that have been uploaded?

anon091 10-14-2011 01:00 PM

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.

grim76 10-14-2011 01:24 PM

Is the group on the files the same? Can you post some of the output, or logs from where you can't delete files?

anon091 10-14-2011 01:34 PM

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.

grim76 10-14-2011 02:25 PM

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.

anon091 10-17-2011 07:56 AM

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.

grim76 10-17-2011 08:26 AM

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.

anon091 10-17-2011 08:33 AM

same here, hopefully someone else has had this odd experience and can chime in.

anon091 03-16-2012 02:09 PM

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 ;)


All times are GMT -5. The time now is 02:03 PM.