allowed to create/edit a file but not to DELETE A FILE.
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
allowed to create/edit a file but not to DELETE A FILE.
greetings;
centos 6
I command this chmod o+rwx /folder. From my xp I can access \\server\folder, create and delete into this file.
But how to provide permission where he can create/edit a file BUT RESTRICTED TO DELETE A FILE.
In windows this can be done in advnce security how about in linux?
You may be able to do it via Samba cfg, but in *nix, creating/deleting a file is a write operation on the dir inode, not the file.
I don't think *nix perms or even ACLs is going to do it.
Sticky bit only prevents others from deleting a file you create; it can't stop you deleting a file you created.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Quote:
Originally Posted by chrism01
You may be able to do it via Samba cfg, but in *nix, creating/deleting a file is a write operation on the dir inode, not the file.
I don't think *nix perms or even ACLs is going to do it.
Sticky bit only prevents others from deleting a file you create; it can't stop you deleting a file you created.
So doesn't that mean that setting write restrictions on the directory does exactly that? Enable to write the file, but not to delete it. I recall that I had this problems (in conjunction with Samba) where I could not delete files.
You need write access on the dir to create file (in that dir) and also to delete one; they both count as write ops on the dir inode/file itself. There's no delete perm in *nix, unlike eg OpenVMS.
I think(?) you can get what you want if you go via a Samba/cifs cxn; check the Samba docs.
You need write access on the dir to create file (in that dir) and also to delete one; they both count as write ops on the dir inode/file itself. There's no delete perm in *nix, unlike eg OpenVMS.
I think(?) you can get what you want if you go via a Samba/cifs cxn; check the Samba docs.
This are what i command:
note: centos is joined in win2003
1. chmod 1070 /folder
2. under my samba..
directory mask = 0770
create mask = 0770
drwxr-xr-x. 2 nixuser domain users 4096 May 10 16:24 nix1 (folder nix1 created in centos)
drwxrwx---. 2 xpuser domain users 4096 May 10 16:29 win1 (folder win1 created in windows)
base on the problem i raise, the sticky bit answered my question only owners can create/delete their own file..done
the issue right now is creating/editing between folders..
Maybe this is a good start for me...I really dont know if im going the right way
If Samba won't do it, you may have to resort to dir monitoring eg dnotify/fam and call a script to move the completed file to another area where the dir perms are r-x only.
Alternately, use a code ctrl system eg cvs, subversion etc.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.