LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   problem chainging permission to file (https://www.linuxquestions.org/questions/linux-desktop-74/problem-chainging-permission-to-file-742637/)

mia_tech 07-25-2009 01:38 AM

problem chainging permission to file
 
guys, I have a partition on my main drive that I use for storage of docs, which I created under root, and I mount under /media/storage but now I'm trying to give another user rwx permision with

Code:

sudo chmod -R o+rwx /media/storage
but when I do
Code:

ls -l /media/storage
is still reflecting the old permission is like I'm not actually modifying anything and I'm not getting any errors

Thanks

jdkaye 07-25-2009 07:27 AM

Quote:

Originally Posted by mia_tech (Post 3619577)
guys, I have a partition on my main drive that I use for storage of docs, which I created under root, and I mount under /media/storage but now I'm trying to give another user rwx permision with

Code:

sudo chmod -R o+rwx /media/storage
but when I do
Code:

ls -l /media/storage
is still reflecting the old permission is like I'm not actually modifying anything and I'm not getting any errors

Thanks

can you show us what the results are of
Code:

ls -l /media/storage
and
Code:

ls -l /media
cheers,
jdk

mia_tech 07-25-2009 09:39 AM

I got it fixed now, but my question is: if I wanted to give rwx permission to another user other than the owner of that file... is
Code:

sudo chmod o+rwx /file/file
the only alternative, because that gives rwx to all users

jdkaye 07-25-2009 09:50 AM

Quote:

Originally Posted by mia_tech (Post 3619911)
I got it fixed now, but my question is: if I wanted to give rwx permission to another user other than the owner of that file... is
Code:

sudo chmod o+rwx /file/file
the only alternative, because that gives rwx to all users

No, if the other user is in the same group as the owner then
Code:

chmod ug+rwx {file/folder name}
will do the job.
cheers,
jdk

jschiwal 07-28-2009 04:11 AM

You can use ACLs to give finer controls to permissions. See the man pages for setfacl and getfacl.
You would need to give the user rx permissions on the directory for that user to be able to access a file inside.


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