• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

Want to Exclusive Lock directory in Linux

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
mivbinfotech
Asked:
mivbinfotech
  • 2
  • 2
1 Solution
 
NickUpsonCommented:
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
 
mivbinfotechAuthor Commented:
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
 
NickUpsonCommented:
nothing you can do can stop root
0
 
mivbinfotechAuthor Commented:
I have not able to achieve what i want but

thanks for all your support...

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now