write permissions for directory - not accidently move/deleted the directory
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
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.
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.