LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Chown/Chmod ff Directories/Files Question (https://www.linuxquestions.org/questions/linux-newbie-8/chown-chmod-ff-directories-files-question-514021/)

Genin 12-27-2006 09:10 AM

Chown/Chmod ff Directories/Files Question
 
Greetings !

I run a ftp-server for me and a small number of friends.

I have made them "virtual" by giving them no shell.
I also have chroot:ed them to a ftp directory.
They are in a group in order to have diskquota work.

My 'problem' is this:

I would like to have an upload directory where they can
upload files but not being able to delete files in this
directory unless the files are uploaded by themselves.

As it is now anyone of them can delete any file....
I have tried making them "groupless" but with the same
result.

I have a vague memory of that it "worked" when I first
tested the ftp with two users of no group, they could upload
but not delete each others files...

Any idea as to how to use chown/chmod/groups to make this work?

Best Regards, Genin

crabboy 12-27-2006 10:18 AM

Permission to create and delete files are controlled from the permissions on the directory and not the file, so if you have write permission on a directory you can both add and delete regardless of the file ownership or rights.

What ftp server are you using?

Genin 12-27-2006 11:00 AM

Quote:

Originally Posted by crabboy
Permission to create and delete files are controlled from the permissions on the directory and not the file, so if you have write permission on a directory you can both add and delete regardless of the file ownership or rights.

Yeah I kind of suspected that.. Still what use are the
permissions on a file if it is controlled from the directory?


Quote:

Originally Posted by crabboy
What ftp server are you using?

VSFTP

Best Regards, Genin

crabboy 12-27-2006 11:26 AM

Quote:

Still what use are the
permissions on a file if it is controlled from the directory?
The permissions on the file control access to the contents of the file.

Not being a vsftp user myself, I took a quick look at the man page and it looks like there are some commands for anonymous users that permit uploads with out allowing deletes. There is also a separate option that restricts virtual users to the permissions of a anonymous user, not sure if it will work, but have you tried playing with these options?

Genin 12-27-2006 11:51 AM

Quote:

Originally Posted by crabboy
The permissions on the file control access to the contents of the file.

Not being a vsftp user myself, I took a quick look at the man page and it looks like there are some commands for anonymous users that permit uploads with out allowing deletes. There is also a separate option that restricts virtual users to the permissions of a anonymous user, not sure if it will work, but have you tried playing with these options?

No but I am on to it know :)

Thanks for the input mate :D


All times are GMT -5. The time now is 05:43 PM.