Locked out of CHMOD? SOLVED!

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

Locked out of CHMOD? SOLVED!

#1 Post by 8-bit »

In the Quirky 6.01 files I downloaded, there are two install scripts.
They show as POSIX executable shell scripts using the properties tab.
But I would like to be able to remove the execute permission so that an accidental click on the script would not start it.

At this point, I seem to be running into a brick wall as I have been unable to change any file permissions on the files or a copy of one of them, renamed, that I was using for test purposes.

I remember that in linux/Puppy, one is supposed to have control over their system and files.

So... Does someone know something I do not?
Last edited by 8-bit on Fri 10 Jan 2014, 17:05, edited 1 time in total.

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#2 Post by vovchik »

Dear 8-bit,

Have you checked the files with chattr?

http://en.wikipedia.org/wiki/Chattr

You can make files unchangeable this way, even for root! This is good if you really don't want something changed and might be the cause of your problem.

With kind regards,
vovchik

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#3 Post by rcrsn51 »

In what filesystem are the scripts located - fat32?

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#4 Post by 8-bit »

rcrsn51 wrote:In what filesystem are the scripts located - fat32?
The files are actually located on an NTFS partition and I was trying to change them from Puppy linux Slacko 5.5.

I suppose I could try copying one to my linux partition and see if chmod worked there.

In the mean time, I will read up on the information linked by vovchik.

I just might learn something in the process.

Problem solved! After moving the scripts to a linux partition, chmod was able to change the file's attributes.
But I did learn something in the process.
You cannot change file permissions on a file stored on an NTFS partition using linux commands!

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#5 Post by amigo »

On FAT and NTFS filesystems files will always be set with 777 perms. Actually they aren't 'set' to anything, so they default to 777 under Linux. You *can* avoid them being executable with the mount option 'noexec', though.

Still, have a read about chattr and the extended file attributes available under all ext* FS's and others. Basically, 'chattr +i file' makes it 'immutable' by anyone, but, of course, root can use chattr to remove the immutable attribute with 'chattr -i file' and then it can again be modified or removed.

Post Reply