Click to See Complete Forum and Search --> : chmod for folder
jackeng1983
Sep 7th, 2010, 10:20 PM
hi, Experts.
I am facing a difficulty in samba sharing permission setting.. i wish to allow all permission to all nobody user, but not to allow the add and delete feature in my shared folder.
For example:
In my shared folder A, it has file A.
The user can edit and save the file A, but the user not allowed to delete the file A and also not allowed to add any files/folders in folder A.
What is the chmod command should i use to apply for folder A to meet the requirement above?
Thanks
Jack
jackeng1983
Sep 9th, 2010, 04:37 AM
Hi,
Is any experts can help?
MarMan
Sep 9th, 2010, 07:07 AM
Can you explain better? Spell out exactly what it is you wish to do.
jackeng1983
Sep 9th, 2010, 10:45 AM
i did edited my thread, hope you can understand me.. sorry for my poor English.
MarMan
Sep 9th, 2010, 10:49 AM
Never used it myself, perhaps this can help:
http://catcode.com/teachmod/
jackeng1983
Sep 12th, 2010, 10:58 PM
Never used it myself, perhaps this can help:
http://catcode.com/teachmod/
Yes, i tried to view this before.. There is only guide for read,write and execute permission, no add or delete permission guide.
penagate
Sep 15th, 2010, 11:42 PM
Read, write, and execute are the only priveleges you can assign. They have different meanings for files and for directories.
Have a look at the table on this page:
http://webmasterworkshop.com/guides/chmod_guide.shtml
and the Wikipedia article:
http://en.wikipedia.org/wiki/Chmod
In your case, you could use:
chmod -R a=rw dirA
chmod a-w+x dirA
The first command assigns read and write permissions for all groups for dirA and all directories and folders beneath it.
The second modifies the permissions for dirA itself by removing the write permission (so that one cannot add or remove files) and adding execute (so that one can list the directory contents).
The problem with this approach is that only the root user will be able to modify the directory tree.
Depending on how your Samba server is set up, you could perhaps use chown to set the owner/group of the directory and assign permissions differently for user/group/owner.
jackeng1983
Sep 16th, 2010, 12:32 AM
Read, write, and execute are the only priveleges you can assign. They have different meanings for files and for directories.
Have a look at the table on this page:
http://webmasterworkshop.com/guides/chmod_guide.shtml
and the Wikipedia article:
http://en.wikipedia.org/wiki/Chmod
In your case, you could use:
chmod -R a=rw dirA
chmod a-w+x dirA
The first command assigns read and write permissions for all groups for dirA and all directories and folders beneath it.
The second modifies the permissions for dirA itself by removing the write permission (so that one cannot add or remove files) and adding execute (so that one can list the directory contents).
The problem with this approach is that only the root user will be able to modify the directory tree.
Depending on how your Samba server is set up, you could perhaps use chown to set the owner/group of the directory and assign permissions differently for user/group/owner.
chmod a-w+x dirA
yes, this make the users cannot add or remove files in this dirA folder, this work great... how about i want to able edit the file? (currently the file able for read only).
penagate
Sep 16th, 2010, 01:07 AM
You need write permissions on the files. That's what the first command I gave you does. You need to run both, in order.
jackeng1983
Sep 20th, 2010, 10:09 PM
i already tried, the file become read only after executed the both command that u gave.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.