Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Read, Execute and Write once?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
batfoot
Apprentice
Apprentice


Joined: 26 Jul 2004
Posts: 197

PostPosted: Tue Dec 19, 2006 3:27 am    Post subject: Read, Execute and Write once? Reply with quote

Hello,

I have a samba share that I want users to be able to read, write, execute and delete. I have a group setup which allows this no problem.

However, I also have 'other' users, I want these users that aren't in any group, to be able to read, and upload files. But once uploaded, I don't want them to be able to remove or change the files that even they have uploaded. Is there an easy way to do this?

I know the sticky bit will allow users to upload, and once uploaded, only that user will be able to remove/change the file. But I can't find anything that will stop any user, apart from the allowed group to do so.

Thanks alot if anyone can lend a hand.

>Craig
Back to top
View user's profile Send private message
thesheff17
Apprentice
Apprentice


Joined: 12 Jan 2005
Posts: 283

PostPosted: Tue Dec 19, 2006 7:29 am    Post subject: Reply with quote

hmmm....good question. one way that isn't efficient is to run a cron job to change the owner/permission on the whole sub directory. I know this isn't the best option but it will work.

you say upload? do you just mean copy and past on a samba share? or are you really uploading from a web server. I have a program to take a file that a user uploaded and modify the permissions and the owner as soon as it is uploaded to get rid of any issues with access rights.

another way that might take some time is:

Can you parse the samba log on what is sent to the share and then wrap a program around it to change the owner/permissions. This would be alot better on performance then just changing the whole permissions on the share on a cron job.

If I can think of something else I will let you know but this would be the way I would do it quick and dirty.
Back to top
View user's profile Send private message
defenderBG
l33t
l33t


Joined: 20 Jun 2006
Posts: 817

PostPosted: Tue Dec 19, 2006 8:07 am    Post subject: Reply with quote

hm... make a new user group? let say samba
then make the samba share a owned by the samba user group. make the owner be able to read/write/delete and the guest to only read/write? do u mean something like this?
Back to top
View user's profile Send private message
thesheff17
Apprentice
Apprentice


Joined: 12 Jan 2005
Posts: 283

PostPosted: Tue Dec 19, 2006 8:10 am    Post subject: Reply with quote

yea defenderBG that will work. I just assumed he had the share fully opened and is not using a username/pass. defenderBG has the right route. Create the groups/users and give the usernames out accordingly
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum