?
Solved

Want to Exclusive Lock directory in Linux

Posted on 2007-03-23
6
Medium Priority
?
261 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 2000 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.
Suggested Courses
Course of the Month8 days, 18 hours left to enroll

764 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