-   Linux - Newbie (
-   -   backup directory with root only permissions? (

hobylinux 08-21-2003 02:02 PM

backup directory with root only permissions?
i would like to create a backup directory on my external hdd that only root can access. i tried doing this by running konqueror as root and also by logging in as root, but in both instances i was unable to restrict access to the directory to root only. any suggestions?

also, after i get this set up successfully, what is the easiest (and safest) way to write to this directory while remaining logged in as a user?

thanks a lot.

gargamel237 08-21-2003 06:38 PM

chmod -R 400 /name/of/directory should work if root is the owner of the dir. Drop the -R if you don't want to change the permissions on the lower files/directories.

sudo is going to be your friend as far as letting users write to the directory later.

What is the goal of this project? I have a feeling there are better ways to do what you're looking to do.

hobylinux 08-21-2003 07:03 PM

basically my goal is to backup all of my files to something that can't get hurt on the off chance that i get a virus. i figured backing everything up somewhere i can't access (or at least have read-only access) as a normal user would do the trick. what other ways are there of doing this? i'd certainly be interested.

thanks a lot.

gargamel237 08-22-2003 12:25 AM

tar is meant for this kind of thing and can do bunches of cool stuff like only change updated files and stuff. Plus everything'll be compressed!

From a permissions standpoint, the problem with giving the user access to write to the file is that the user has access to write (and overwrite) to the file meaning that you've not solved the problem of being able to accidentally destroy your files.

What about maintianing ownership and permissions on your backup files and just unmounting the volume when you're not actively backing up?

All times are GMT -5. The time now is 03:31 AM.