LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 12-27-2006, 09:10 AM   #1
Genin
LQ Newbie
 
Registered: Dec 2006
Posts: 4

Rep: Reputation: 0
Question 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
 
Old 12-27-2006, 10:18 AM   #2
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
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?
 
Old 12-27-2006, 11:00 AM   #3
Genin
LQ Newbie
 
Registered: Dec 2006
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
Old 12-27-2006, 11:26 AM   #4
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
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?
 
Old 12-27-2006, 11:51 AM   #5
Genin
LQ Newbie
 
Registered: Dec 2006
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CHMOD directories.sub-directories.files zerojosh Linux - Software 2 11-19-2005 03:22 PM
chmod and chown affecting whole directories linuxmandrake Linux - Newbie 1 10-08-2005 07:04 PM
help with chmod chown on cdrom copied files spacklebird Linux - Software 2 11-19-2003 12:48 AM
chmod vs chown on some root files and yes apps ergo_sum Linux - Newbie 3 11-12-2003 10:49 AM
chmod directories and files seperately robeb Linux - General 2 05-23-2003 08:01 PM


All times are GMT -5. The time now is 11:55 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration