I need to set permissions for FTP so that users have write permissions to files, but they are not the owner. I’m not sure how to set it

Thanks!

6 Spice ups

Set the group, provided they are in the group that owns the file, so like 775 as an example the first seven grants all rights to the owner, the second 7 all rights to the group, and read/execute to everyone.

1 Spice up

Thanks Alex. The end goal is to prevent the user from setting permissions or the time/date stamp (It’s a specific error from WinSCP and I’m trying to setup an FTP site to make that error come up). With the group having a 7 will this prevent them from setting permissions and or the time/date stamp?

If they have write access to the file I am not sure how you can safe guard against that.

this link can help you:

http://linuxcommand.org/lts0070.php

Thanks kokonsny1. That’s a useful link. I’m familiar with how to read permissions, change permissions and set ownership. The problem I am having is no matter how I seem to set directory permissions, a person who creates a file is the owner, and therefor can do whatever they want to the file.

Is it possible to have someone create a file and not be the owner? Or immediately after the file is created, can chown ru to set the owner as someone else?

We are getting this behavior on some of the FTP servers (they we don’t control) that one of our applications connects to. I’m trying to set one up in a test environment so we can fix our code

you can have cronjob running a command like this every few minutes or seconds

find /your directory -uid 1123 -exec chown newuser:newgroup {} +