Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-04-2011, 07:37 AM   #1
LQ Newbie
Registered: May 2011
Posts: 2

Rep: Reputation: 0
file permission on linux

hi all,
im very new for linux.
is possible to make a folder permission like below?
-user can create files/folders in the shared folder.
-but the files/folders they created, cannot be delete/change by em.
(only can be delete by root users)
-each new files/folders created will auto owner to root only.

thanks in advance!
Old 05-04-2011, 07:58 AM   #2
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello and Welcome to LinuxQuestions,

In my opinion this sounds pretty much like an exam question or homework. At least it's something I'd consider asking in a test. Since we're not in the habit of providing guides/howto/ready made solutions, I'm asking you what you've tried so far and what the results are or where it's failing. There's a lot you can do with various commands in order to achieve what you need/want. But you'll have to research, read, try, solve and when you cannot find any solution we'd be happy to assist. Have fun with Linux.

Kind regards,

Old 05-04-2011, 10:44 PM   #3
LQ Newbie
Registered: May 2011
Posts: 2

Original Poster
Rep: Reputation: 0
hi, thanks for advice.

ive been keep trying over and over to get this work.

here is getfacl from /UserShared:
file: /UserShared
# owner: root
# group: usershared

now all the users can create/delete files in /UserShared folder.
how can i remove deleting permission from em?? (this is what im trying to do)
the permission only r w x
if i remove w from em, yes they cant delete the files but they also cannot creating files
Old 05-05-2011, 12:36 AM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Consider that creating a file requires 'writing' to the dir file itself ... so does deleting a file, because again you are 'writing' in the dir file itself.

Write perm on the data file is write perm to edit the data content of the data file.

Old 05-06-2011, 05:41 PM   #5
Registered: Mar 2005
Location: Ohio
Distribution: Freebsd and Ubuntu
Posts: 69

Rep: Reputation: 17
This is almost impossible as chrism stated. Creating a file and deleting a file both use write permissions. If you allow them to create a file, they'll be allowed to delete it.

There might be a round about way of doing it (forcing the user to revoke themselves write permissions to that file right after creating it), but there's no easy or consistent way of doing that that I know of.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Linux client -> Linux server 'Permission denied' when copying file to samba share spengilley Linux - Networking 2 05-02-2011 11:11 AM
Linux File Permission questions citrus Linux - General 3 02-24-2010 08:15 PM
Linux file/directory permission question cpthk General 11 09-04-2009 02:32 AM
linux changing file permission a_vall Linux - General 5 04-15-2006 09:48 AM
How exactly does Linux file permission inheritance work HGeneAnthony Linux - Newbie 5 04-14-2006 11:20 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:39 PM.

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