is it possible to change the permission of a file without using chmod
command ?
> is it possible to change the permission of a file without using chmod
> command ?
Sure, just write a C program that does that, give it a name different
from "chmod", and call it. Or use a graphical file manager, right
click, "properties" -> "permissions..." and change the permissions.
You can change permission with lynx, though of course only if you
have permission to do it (ie you are the owner of the file, or root).
I'm sure MC can do it too.
SOmehow though, I don't think that was what the poster was getting
at, though I'm not sure exactly what they were asking.
Michael
Or you could recompile the kernel to treat all the file permissions
completely differently..or wrote a whole new operating system..
Can you explain how you mean? Are you asking if you can use a tool or
GUI for changing permissions instead of chmod in shell? Or are you
asking if someone disabled chmod, of how you can still change
permissions? Or are you asking if you can create a program that will
change permissions and not have to use chmod? Or, are you asking
something else completely different?
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
Recently a colleague of mine told me that he was not able to delete a
particular folder in his flash drive, using a ubuntu machine.
I tried to help him, by using the 2 methods you said
1 GUI method
i just typed sudo nautilus to get the root browser and navigated to
flash drive folder in /media and tried to delete the file, but i got the
message permission denied,attempting to delete read only file system
2 using chmod
i tried to change the permission of the folder via chmod -R 777, command
then i got the message message permission denied,attempting to change
permission of read only file system
then i checked the folder contents via ls -l , to see if there is any
suid or sgid bit set but i didn't find any ?
finally we had to take the flash drive to a windows machine to delete
the folder
NB: the only thing i could remember about the folder was it was copied
from the /usr/share/tomcat5.5 folder
> i tried to change the permission of the folder via chmod -R 777, command
> then i got the message message permission denied,attempting to change
> permission of read only file system
Was it mounted read only?
DId you run the chmod command as root?
it was not mounted read only as i could delete some other folders
of course i ran chmod as root
>> Was it mounted read only?
>> DId you run the chmod command as root?
>
> it was not mounted read only as i could delete some other folders
> of course i ran chmod as root
AH. Well. I'm stumped.
I it was mounted as read/write, then did you check that there were no
file attributes preventing it? List with lsattr.