Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

permission change

0 views
Skip to first unread message

annalissa

unread,
Mar 5, 2009, 12:36:57 PM3/5/09
to
Hi all,

is it possible to change the permission of a file without using chmod
command ?

pk

unread,
Mar 5, 2009, 1:01:37 PM3/5/09
to
On Thursday 5 March 2009 18:36, annalissa wrote:

> 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.

Michael Black

unread,
Mar 5, 2009, 1:14:02 PM3/5/09
to

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

The Natural Philosopher

unread,
Mar 5, 2009, 1:18:33 PM3/5/09
to
You could remove the disk, and pick through the inode blocks with a hex
editor on a hardware emulator..


Or you could recompile the kernel to treat all the file permissions
completely differently..or wrote a whole new operating system..

Tim Greer

unread,
Mar 5, 2009, 1:54:22 PM3/5/09
to
annalissa wrote:

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!

annalissa

unread,
Mar 5, 2009, 8:09:23 PM3/5/09
to
Tim Greer wrote:
> annalissa wrote:
>
>> Hi all,
>>
>> is it possible to change the permission of a file without using chmod
>> command ?
>
> 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?

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

Maxwell Lol

unread,
Mar 5, 2009, 9:54:09 PM3/5/09
to
annalissa <aar...@gmail.com> writes:

> 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?

annalissa

unread,
Mar 5, 2009, 11:38:19 PM3/5/09
to

it was not mounted read only as i could delete some other folders
of course i ran chmod as root

Maxwell Lol

unread,
Mar 6, 2009, 6:00:34 AM3/6/09
to
annalissa <aar...@gmail.com> writes:

>> 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.

Tim Greer

unread,
Mar 6, 2009, 1:03:25 PM3/6/09
to
annalissa wrote:

I it was mounted as read/write, then did you check that there were no
file attributes preventing it? List with lsattr.

Bill Marcum

unread,
Mar 6, 2009, 5:35:51 PM3/6/09
to
That's the problem, the flash drive was formatted in FAT or NTFS. Those
file systems don't have Unix-style permissions, so the owner and
permissions for the entire file system are set when it is mounted.

0 new messages