Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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?
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.
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?
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?
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.