Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 10-01-2008, 08:38 PM   #1
LQ Newbie
Registered: Sep 2008
Posts: 2

Rep: Reputation: 0
Prevent folder deletion, centos 5


I am fairly new to linux and I'm not great with setting file permission yet.

I am using centos 5 and have a webdav service running.
I am trying to set up specific folders within the webdav that can't be deleted by anyone other then root while allowing the subfolders and files to be added and deleted by anyone accessing the files via webdav or ftp.

Does anyone know how to do this or have recommendations on other ways of accomplishing the same thing?


Daniel Edmondson
Old 10-01-2008, 11:10 PM   #2
Registered: Jun 2008
Location: Jakarta
Distribution: CentOS 5
Posts: 89

Rep: Reputation: 17

please mention more about the detail permission,

if u want the folder only to be written by root and readable to other then use chmod 644 [path to folder]

if there is an executable files and u want to grant it then use chmod 755 [path to folder]

if u want only those folder read write execute only by root the use chmod 700 [path to folder]

for your case, u can use this solution:
situtation is that you login as root
parent folder name = /father [sticky bit purpose for children folder, only writeable by root]
shared folder name = /children [user cannot delete this folder, but can write below this folder]

- create the parent folder with sticky bit set.
mkdir /father
chmod o+t /father [this will set sticky bit]

- create the shared folder
cd /father
mkdir children
chmod 777 children [everone can access & write, but not delete this folder]

another solution is using acl.
note: folder is owned by root [use chown to set owner/group]

Please spend a time to read the manual --> man chmod

try it and post the error if there is.

Last edited by WorldIsNotFair; 10-01-2008 at 11:57 PM.
Old 10-01-2008, 11:40 PM   #3
LQ Newbie
Registered: Oct 2006
Posts: 16

Rep: Reputation: 0
Hi, try this out. it is a good tutorial to start with.





deletion, directory, file, permissions

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent access to root folder ]SK[ Linux - Security 6 08-14-2007 07:48 AM
File and folder deletion Rick069 Linux - Software 5 02-13-2006 10:08 PM
BASH: how to automate deletion of oldest folder big_mike_jones Programming 18 11-22-2005 03:59 PM
ROX-filer: file deletion and trash folder woland Linux - Software 0 08-23-2004 12:16 AM
Automatic deletion of spam folder? RKris Linux - General 1 05-27-2003 09:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration