|
-
Sep 7th, 2010, 10:20 PM
#1
Thread Starter
Lively Member
chmod for folder
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
Last edited by jackeng1983; Sep 9th, 2010 at 10:40 AM.
-
Sep 9th, 2010, 04:37 AM
#2
Thread Starter
Lively Member
Re: chmod for folder
Hi,
Is any experts can help?
-
Sep 9th, 2010, 07:07 AM
#3
Re: chmod for folder
Can you explain better? Spell out exactly what it is you wish to do.
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
-
Sep 9th, 2010, 10:45 AM
#4
Thread Starter
Lively Member
Re: chmod for folder
i did edited my thread, hope you can understand me.. sorry for my poor English.
Last edited by jackeng1983; Sep 9th, 2010 at 10:51 AM.
-
Sep 9th, 2010, 10:49 AM
#5
Re: chmod for folder
Never used it myself, perhaps this can help:
http://catcode.com/teachmod/
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
-
Sep 12th, 2010, 10:58 PM
#6
Thread Starter
Lively Member
Re: chmod for folder
 Originally Posted by MarMan
Yes, i tried to view this before.. There is only guide for read,write and execute permission, no add or delete permission guide.
-
Sep 15th, 2010, 11:42 PM
#7
Re: chmod for folder
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.
Last edited by penagate; Sep 15th, 2010 at 11:46 PM.
-
Sep 16th, 2010, 12:32 AM
#8
Thread Starter
Lively Member
Re: chmod for folder
 Originally Posted by penagate
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).
-
Sep 16th, 2010, 01:07 AM
#9
Re: chmod for folder
You need write permissions on the files. That's what the first command I gave you does. You need to run both, in order.
-
Sep 20th, 2010, 10:09 PM
#10
Thread Starter
Lively Member
Re: chmod for folder
i already tried, the file become read only after executed the both command that u gave.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|