LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-11-2020, 06:26 PM   #1
coltson
Member
 
Registered: Oct 2010
Posts: 149

Rep: Reputation: 3
To allow anything to be written on a dir, but also to not erase anything.


Hello, I recently decided to change the permissions or ownership of several files as to diminish the risks of accidentally erase them.

My problem is that I want to continue to save files in this dir and its subdirs while I should never able to erase anything unless when I gave myself root privileges.

I tried to do so by changing the ownership of all the files and subdirs to root and then giving write permissions to root only, while everyone else can only read and execute.

But by doing so, no one can write on it.

So can I cam accomplish my goal?
 
Old 07-11-2020, 06:30 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Make the files immutable with chattr -i.
 
  


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
copy files only in dir 2 that are not also in dir 1 into a new dir jr_bob_dobbs Linux - General 6 03-22-2018 10:35 AM
copying files from home dir to another dir from another dir in a lower dir chomito44 Linux - General 5 10-19-2013 06:18 PM
Move files contained in source dir to destination dir, but not source dir itself unixunderground Linux - Software 3 09-20-2013 11:17 AM
tar dir and sub dir removing files but not existing not empty dir j-me Linux - General 2 08-12-2013 11:37 AM
deny accessing the dir but still allow images in the dir to be used by 'HTML' wikignu Linux - Server 2 01-12-2009 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:13 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