LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-20-2003, 02:14 PM   #1
linuxgamer
Member
 
Registered: Sep 2003
Distribution: SuSE, Linspire, Fedora, RH Enterprise
Posts: 89

Rep: Reputation: 15
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

Last edited by linuxgamer; 11-20-2003 at 02:16 PM.
 
Old 11-20-2003, 02:21 PM   #2
Jose Muņiz
Member
 
Registered: Jul 2003
Location: Mexico City
Distribution: Slackware 9.1, SuSE 9.1
Posts: 248

Rep: Reputation: 32
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.
 
Old 11-20-2003, 02:25 PM   #3
linuxgamer
Member
 
Registered: Sep 2003
Distribution: SuSE, Linspire, Fedora, RH Enterprise
Posts: 89

Original Poster
Rep: Reputation: 15
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?
 
Old 11-20-2003, 02:34 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
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

Last edited by jailbait; 11-20-2003 at 02:35 PM.
 
Old 11-20-2003, 02:39 PM   #5
linuxgamer
Member
 
Registered: Sep 2003
Distribution: SuSE, Linspire, Fedora, RH Enterprise
Posts: 89

Original Poster
Rep: Reputation: 15
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.
 
Old 11-20-2003, 02:51 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 11-20-2003, 02:53 PM   #7
linuxgamer
Member
 
Registered: Sep 2003
Distribution: SuSE, Linspire, Fedora, RH Enterprise
Posts: 89

Original Poster
Rep: Reputation: 15
Doh, help from Tinkster, grrrrr, j/k man
 
Old 11-20-2003, 02:56 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 11-20-2003, 02:58 PM   #9
linuxgamer
Member
 
Registered: Sep 2003
Distribution: SuSE, Linspire, Fedora, RH Enterprise
Posts: 89

Original Poster
Rep: Reputation: 15
kewl
 
Old 11-26-2003, 07:55 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hi, just following up ...

Is the result of my suggestion what you
expected?


Cheers,
Tink
 
Old 12-02-2003, 03:04 AM   #11
linuxgamer
Member
 
Registered: Sep 2003
Distribution: SuSE, Linspire, Fedora, RH Enterprise
Posts: 89

Original Poster
Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba directory permissions - can't write from XP ajkrishock Linux - Networking 2 10-16-2005 12:56 PM
how to write a script to move files from one directory to another myeire Linux - Newbie 7 02-25-2005 10:01 AM
How do I mount a samba directory with write permissions? xerogravity Linux - Newbie 7 12-05-2004 01:43 PM
I accidently deleted the lib directory ICO Slackware 2 02-10-2004 12:40 PM
How do I change read/write permissions for a whole directory? Stevetgn Linux - Newbie 8 12-31-2003 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration