[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Troubles with moving /var



On 20/12/99 Alberto Bigazzi wrote:

I actually did it "by hand", by tar-ing /var, copying it under /home and
untaring it there. Then deleting /var and symlinking /home/var to /var.

But I guess this is something VERY BAD as I ended up with lots of problems
with PERMISSIONS. Now normal users CANNOT write into directories under
/var,  like /var/log or /var/lock, so I get lots of troubles of any
kind...

sounds like you forgot the -p switch to tar, which preserves the permissions, without it everything gets set according to your (probably root's) umask, if you have already nuked the real /var then your in for a bunch of chmoding i suppose.. I am not sure the best way to find out what the permissions are supposed to be other then have someone send you a recursive ls -l of their /var hierarchy. I am not aware of any quick way to restore the permissions to the proper values other then manually at this point, perhaps someone else has some ideas?

just a couple i can tell you now, /var/lock is mode 1777, /var/log is mode 755 (users should not be able to write there), /var/spool/mail is mode 2775 those are the most important `special' directories i can think of right now, but there are several daemons with special directories under /var that have different owners/modes to allow them to run non-root.

always mv the old directory out of the way and test your change before rm -rfing it ! :-)


--
Ethan Benson
To obtain my PGP key: http://www.alaska.net/~erbenson/pgp/


Reply to: