Solved

Want to Exclusive Lock directory in Linux

Posted on 2007-03-23
6
246 Views
Last Modified: 2012-08-14
I have a directory which I want to lock exclusively so that nobodu can put files in that directory

I have to encrypt the files in that directory and move the files to specific locations and delete all files and then empty the directory but during the execuition of all this i do not want any user to access that directory and put or remove files, other than teh user doing this, the script will do all this task, but I m having trouble locking the directory for exclusive access to that user,,, I am using HP _ AUX please advise at the earliest,

Thanks

0
Comment
Question by:mivbinfotech
  • 2
  • 2
6 Comments
 
LVL 19

Accepted Solution

by:
NickUpson earned 500 total points
ID: 18780720
login using a specific user id and set the directory permissions so that only that user can use it, e.g.

login as fred

chmod 700 /home/mydir # no-one else can use it

mv & copy files etc

chmod 777 (or whatever is reasonable) /home/mydir
0
 
LVL 2

Author Comment

by:mivbinfotech
ID: 18781576
if i do this will root still have access to this please advise,, i do not want even root to have access apart from fred ..
0
 
LVL 19

Expert Comment

by:NickUpson
ID: 18782389
nothing you can do can stop root
0
 
LVL 2

Author Comment

by:mivbinfotech
ID: 18934575
I have not able to achieve what i want but

thanks for all your support...

0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
cannot rename datastore 3 98
ignore other .htaccess 2 71
maybe no no httpd.conf 6 79
postfix start error! 9 55
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question