Solved

Want to Exclusive Lock directory in Linux

Posted on 2007-03-23
6
251 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

690 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