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.
I have File server (samba) in my office. I need to give some special permissions for folder and files. for example.
The root user can do read, write, execute and delete. but other users and group users are can able to read, write and execute. but users and group users are can't able to delete the file and folders. only root users can delete files and folders. please help me how to i give access for that folders.
AFAIK, you can't differentiate writing and deleting within samba from a technical perspective, but why would you want to? What's the logical difference, in terms of your data integrity, in deleting a file and removing all the contents from the file and saving is as empty?
AFAIK, you can't differentiate writing and deleting within samba from a technical perspective, but why would you want to? What's the logical difference, in terms of your data integrity, in deleting a file and removing all the contents from the file and saving is as empty?
Hi
Thanks for reply.
My main thing is normally in linux users and group users cant able to delete. root only do that. how i do this can you advise me.
That is not true. It depends which files you are talking about. The files and folders owned by root are not accessible to others. In the same way files and folders owned by others can not be deleted. And everything depends on the nature of the permissions.
That is not true. It depends which files you are talking about. The files and folders owned by root are not accessible to others. In the same way files and folders owned by others can not be deleted. And everything depends on the nature of the permissions.
Well he seems to want the root files to be accessible, just not deletable, and under a posix environment, a user can write to a file owned by someone else but with 666 rights, so that would naturally fall through to proivde what the OP is asking for I guess, but there is still the question of why this is important in the first place. if the user can destroy the contents of a file, who cares if they can delete it or not?
Exactly. It seems OP is confused on the permissions front. And by default root can actually read write and delete the files. I do not what OP wants and why.
Exactly. It seems OP is confused on the permissions front. And by default root can actually read write and delete the files. I do not what OP wants and why.
My problem is always folder and files missing complaints that is the reason the users can able to read write permissions but they cant able to delete file and folders.everyday lot of files and folder deleted in the server.
i dont know who deleted and how it was happen. so please give any solution to restrict this issues.
In all honesty, user education I'd say. But as above, if these files are owned by root and world writable, users actually wouldn't be able to delete them under conventional posix standards. But don't use the root account, that's really not good.
Hi
Thanks for the reply.
sticky bit is used to restrict one user's data to others access. but in this scenario how is possible please can u explain briefly.
because one folder can access multiple users and groups. please advise me.
Sticky bit is used to restrict deletion and renaming of files. And that is what you want. But keep in mind, sticky bit is set on folders. This is closet you can get. So you can use this and find some solution to your issue.
Sticky bit is used to restrict deletion and renaming of files. And that is what you want. But keep in mind, sticky bit is set on folders. This is closet you can get. So you can use this and find some solution to your issue.
Hi
Thanks for reply.
sticky bit is suit or not in samba file server. because in others concept its ok.
but it this case one folder access by many users at the same time. how we use otherwise any changes to in smb.conf file please advise
thanks
Last edited by saran_redhat; 11-11-2010 at 07:10 AM.
What you could do is set sticky bit on the parent folder that is shared in samba recursively. This will make all the contents sticky. You will need to make no changes in the samba configuration then.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.