Directory should not be deleted, But the contents can be


 
Thread Tools Search this Thread
Operating Systems Solaris Directory should not be deleted, But the contents can be
# 1  
Old 11-27-2008
Directory should not be deleted, But the contents can be

Hi Guys,

I have an user's home directory set to /home/A
And A contains the following directories B & C

Is there some way in solaris by which i can prevent the directories B and C from getting deleted by the user but the contents of the directories B & C can be deleted ?

Also i have exported this home directory to Windows via Samba, from where at present, any user with the id and password can modify the folders as well.. Need to prevent this too..

Any help on this matter appreciated

Last edited by localhost; 12-05-2008 at 11:53 AM..
# 2  
Old 12-04-2008
You can only control these by ownerships and permissions
# 3  
Old 12-16-2008
Look at setting the directories sticky bit. Sticky bit will only allow root or the creator/owner to delete the file. This is often done on /tmp to stop users deleting stuff that they haven't created.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Contents deleted from /var/sadm

Hi, Somebody/somebody removed all contents /vat/sadm on Solaris 10 Sparc box. As of now server is up and running. There is no backup for this server. If we copy contents from another equivalent server, can it work ? We don't know if it will be fixed by booting form DVD also. Any suggestions? (4 Replies)
Discussion started by: solaris_1977
4 Replies

2. Shell Programming and Scripting

Accidently deleted /usr contents.

Hi I have the following code which was supposed to clean up a directory when the number of files in that directory exeeded 2.The code is given below. #!/usr/bin/ksh dir_num=`/usr/bin/find /var/.audit -type d | /usr/bin/wc -l` if then oldest_file=`/usr/bin/ls -1t | /usr/bin/tail... (19 Replies)
Discussion started by: chacko193
19 Replies

3. Solaris

Directory cannot be deleted!!!

Friends, I have accidently, as root, created a directory gabsf under /home. Now I cannot delete this thing, I have tried rm and rmdir, as well as explicit path name, but it is really undeleteable. Here is what ls -l says. # ls -l /home total 6 drwxr-xr-x 2 dawood dawood 2 Sep 5... (3 Replies)
Discussion started by: gabam
3 Replies

4. Emergency UNIX and Linux Support

Directory got deleted

One of my directory code where i have stored all my scripts have disappeared . I have no idea on how it got deleted.Could someone pls help me to track-back on what would have happened? I left the office yesterday and today when i just logged in to work with the scripts I could not find the... (13 Replies)
Discussion started by: michaelrozar17
13 Replies

5. UNIX for Advanced & Expert Users

recovering a deleted directory

I accidentally deleted a very important directory today with this rm -r. What would be the recommended way to recover my directory? After a lot of googleing I have seen these choices. Could I get some recommendations please? Testdisk Photorec- Doesn't recover file name like I would like. ... (10 Replies)
Discussion started by: cokedude
10 Replies

6. Shell Programming and Scripting

Remove contents of directory, but not directory

What's the best way to delete everything in a directory, but not the directory itself, without using shell wildcards? (9 Replies)
Discussion started by: pdc
9 Replies

7. UNIX for Dummies Questions & Answers

Best way to list a directory's contents?

Hey guys! I'm so glad I found this site, I've had so many questions and have been left alone for roughly a year scanning man pages but It's just not quite cutting it for some things. So, I often like to list directories when browsing around my local machine, a friend's machine, or my web... (6 Replies)
Discussion started by: bbilheimer
6 Replies

8. Shell Programming and Scripting

files of size 0 need to be deleted inside a directory

Hiiii, I have written a script which takes backup of some log files. let say the backuplocation is --- /abc/backuplocation -rw-r--r-- 1 webmut2 spgroup 0 Jan 27 02:41 ansrpt23994.log -rw-r--r-- 1 webmut2 spgroup 0 Jan 27 02:41 ansrpt3601.log -rw-r--r-- 1... (2 Replies)
Discussion started by: namishtiwari
2 Replies

9. UNIX for Dummies Questions & Answers

list contents of directory

I want to list the contents of a directory, but I do not want to use the ls, is there another way?? (3 Replies)
Discussion started by: carl_vieyra
3 Replies

10. Solaris

Deleted Lost+Found directory

If you delete your lost & found directory, how do you get it back, just do a mkdir? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies
Login or Register to Ask a Question