LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Using chmod on files stored on NFS (https://www.linuxquestions.org/questions/linux-networking-3/using-chmod-on-files-stored-on-nfs-4175411300/)

sploit 06-13-2012 05:52 PM

Using chmod on files stored on NFS
 
I recently bought an Iomega Cloud drive and want to use it to store all my code on. Yesterday, I came across a problem while trying to make a perl script executable.

Here's a directory with a few scripts in it, all were executable prior to being copied onto the drive, except "hi.pl"
Code:

[sploit@localhost Perl]$ ls -l
total 16
-rwxrw-rw- 1 1000 users 834 Dec  3  2011 750words_exporter.pl*
-rwxrw-rw- 1 1000 users 583 Dec  3  2011 fb.pl*
-rw-rw-r-- 1  99 users  27 Jun 13 10:43 hi.pl

Cool, all executable except hi.pl.
Code:

[sploit@localhost Perl]$ chmod +x hi.pl
chmod: changing permissions of `hi.pl': Operation not permitted

Whatever ...
Code:

[sploit@localhost Perl]$ sudo chmod +x hi.pl
[sploit@localhost Perl]# ls -l
total 16
-rwxrw-rw- 1 1000 users 834 Dec  3  2011 750words_exporter.pl*
-rwxrw-rw- 1 1000 users 583 Dec  3  2011 fb.pl*
-rwxrw-rw- 1 1000 users 479 Apr 25 14:21 HelloWorld.pl*
-rwxrwxr-x 1  99 users  27 Jun 13 10:43 hi.pl*

Okay, that works, but I don't want to have to sudo everytime ...
Code:

[sploit@localhost Perl]$ sudo chown sploit hi.pl
chown: changing ownership of `hi.pl': Permission denied

Now, I don't really care about not being able to chown this particular file. What I'd like to chown is the folder, so that I can save files to it and make them executable without having to sudo or "perl hi.pl"

Any ideas on next steps? The NFS settings are set to rwx in the NFS, fstab mounts rw (x shouldn't make a difference as it's an ownership issue).

kbscores 06-13-2012 06:19 PM

Most likely it is the underpermissions. Did your mount point have permissions of 777 or 755 before mounting the drive to it? Also I see that message with our windows NFS drive. May seem like a silly question since it is NFS, but is the filesystem formatted as NFS on the drive? If the drive wasn't formatted prior to mounting it the filesystem on the drive could be what is causing the issue.

Hopefully this helps.

Reuti 06-14-2012 07:23 AM

Yes, ls -la will show the permissions of the directory itself.


All times are GMT -5. The time now is 01:14 PM.