1826122 Members
4722 Online
109690 Solutions
New Discussion

controlling file usage

 
Henry Chua
Super Advisor

controlling file usage

hi guys,
want to discuss is there a good system to control the use of a shared file? i.e. to disallow ppl from using it when am.

regards
henry
1 REPLY 1
Mel Burslan
Honored Contributor

Re: controlling file usage

assuming you have root privileges, trivial solution is to change the ownership and permissions of the file as desired using cron jobs.

for instance if you want people to be able to read /etc/profile only when they log in in the afternoon, you can set up a cron job like this

at 12:01
chmod 755 /etc/profile
^D

commands will be executed .... blah... blah

and one minute past midnight

at 00:01
chmod 700 /etc/profile
^D

commands will be executed .... blah... blah



hope it helps
________________________________
UNIX because I majored in cryptology...