LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   write permissions for directory - not accidently move/deleted the directory (https://www.linuxquestions.org/questions/linux-newbie-8/write-permissions-for-directory-not-accidently-move-deleted-the-directory-118244/)

linuxgamer 11-20-2003 02:14 PM

write permissions for directory - not accidently move/deleted the directory
 
I made a directory for backups, but I dont want to accidently move or delete it.

How can I set the permissions for the directory to allow my
backup programs to write to it, but still not accidently move/delete
the directory?

chown?

remember I am a newbie, please be gentle :P

Jose Muņiz 11-20-2003 02:21 PM

As far as I know, there are three different persmissions: read, write and execute. However, if you are granted a write permission, you will always be able to delete it. (think about it.. if you can write on it.. you can delete what it said or replace it at your own will).

Anyway, the command for changing it is chmod ... you could get more info with a man chmod in the terminal.

linuxgamer 11-20-2003 02:25 PM

Yes, but is there a way that I change change ownership using chown
to root so that user admin can write to it but not delete it because
it is owned by root?

jailbait 11-20-2003 02:34 PM

I suggest a different approach to the problem. Keep several generations of backup. If you lose yesterday's backup you still have the day before yesterday backup and the lost backup is not a total disaster.

Or you could make two simultaneous backups, one to hard disk and the other to CD-RW.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

linuxgamer 11-20-2003 02:39 PM

I have a program that does incremental backups and deletes the
old ones after 7 days. Each backup is about 15GBx7, so my hard drive
space is large but not enough for 30GBx7 for each backup.

I just need to make sure that the main backup folder does not accidently
get removed by a user.

Tinkster 11-20-2003 02:51 PM

Quote:

Originally posted by linuxgamer
I have a program that does incremental backups and deletes the
old ones after 7 days. Each backup is about 15GBx7, so my hard drive
space is large but not enough for 30GBx7 for each backup.

I just need to make sure that the main backup folder does not accidently
get removed by a user.
A work-around would be to deny the
"normal users" read-write access to
the directory in question, but allow
them read-write to the files therein.
That way they can read/write the
contained file/directory, but can't
delete it.

Cheers,
Tink

linuxgamer 11-20-2003 02:53 PM

Doh, help from Tinkster, grrrrr, j/k man

Tinkster 11-20-2003 02:56 PM

Look mate ... I don't hold a grudge against
you... :) ... and I'm more than willing to help.
Always was, and things like THIS ONE don't
come easy, even with having read man pages
a few times.


Cheers,
Tink

linuxgamer 11-20-2003 02:58 PM

kewl

Tinkster 11-26-2003 07:55 PM

Hi, just following up ...

Is the result of my suggestion what you
expected?


Cheers,
Tink

linuxgamer 12-02-2003 03:04 AM

I am still playing with that stuff and in the process of migrating my WindowZ stuff
to SuSE. It sounds like that will work, but I have not fully tested it yet.
I will need to play with for example: chown user:user
for both /dontremove/writablebackupdirectory

Thank you


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