View previous topic :: View next topic |
Author |
Message |
batfoot Apprentice
Joined: 26 Jul 2004 Posts: 197
|
Posted: Tue Dec 19, 2006 3:27 am Post subject: Read, Execute and Write once? |
|
|
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 |
|
|
thesheff17 Apprentice
Joined: 12 Jan 2005 Posts: 283
|
Posted: Tue Dec 19, 2006 7:29 am Post subject: |
|
|
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 |
|
|
defenderBG l33t
Joined: 20 Jun 2006 Posts: 817
|
Posted: Tue Dec 19, 2006 8:07 am Post subject: |
|
|
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 |
|
|
thesheff17 Apprentice
Joined: 12 Jan 2005 Posts: 283
|
Posted: Tue Dec 19, 2006 8:10 am Post subject: |
|
|
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 |
|
|
|