Solved

Want to Exclusive Lock directory in Linux

Posted on 2007-03-23
6
242 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What language/protocol is the Angular Chat? 2 74
Why isn't object file created? 6 58
Bash script - Exit out of choice loop 2 28
awk variable in printf 1 24
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

770 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