LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   very odd permissions problems (https://www.linuxquestions.org/questions/debian-26/very-odd-permissions-problems-420998/)

walterbyrd 03-02-2006 12:49 PM

very odd permissions problems
 
I have two machines that I keep mirrored to each other, aspen and spruce. Both have debian 3.1 unstable.

The /home directory is FAT32, because I share that directory with Windows. Both machines dual-boot.

I keep my music in my /home/public/music directory.

I decided to delete dublicate songs. I found the dups, put them in a file with an rm before each file to delete. i.e.

rm song1.mp3

rm song2.mp3

etc.

I named the file "clean" and intended to use it as a script. I ran the file on aspen, the songs were deleted, no problem.

I copied the file over to spruce, logged in as root, I tried the same thing, and got this error:

- bash: ./clean Permission Denied

The permissions on the script are rwxrwxrwx. The permissions on the directory is rwxrwxrwx. The permissions on all of the files are rwxrwxrwx. And I am logged in as root. How can I be getting a permissions denied error?

It gets stranger. The "clean" script did not have an header. I tried adding the standard header:

#!/bin/bash

And got this error:

- bash: ./clean: /bin/bash: bad interpreter Permission Denied

But I'm sure I'm using the bash shell.

Can anybody tell me WTF is going on?

saman007uk 03-02-2006 01:24 PM

Do any of the mount points have the user flag set?

To quote from the mount man page:
Quote:

user: Allow an ordinary user to mount the file system. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).
This means that no files can be executed in that mount point.

Google is always there to help.

gilead 03-02-2006 01:25 PM

Your home partition should be a Linux file system - the fat32 file system does not support the same file attributes.

You may be able to get around this particular problem by mounting the partition with the exec,umask=0000 options but I'd recommend using a Linux file system for /home and mounting the fat32 partition somewhere else. You can always put a link in your home directory so that it's easy to get to your music.

walterbyrd 03-03-2006 09:12 AM

I suppose it was the /etc/fstab settings.

used to be this:

/dev/hda7 /home vfat rw,user,suid,umask=0000 0 0

Now it's this:

/dev/hda7 /home vfat rw,suid,umask=0000 0 0


Oddly, the /etc/fstab setting were the same in both aspen and spruce. But the script ran on aspen, but not on spruce. Go figure.

Anyway, changing the setting in the /etc/fstab file seemed to fix the problem.

Thank you

saman007uk 03-03-2006 09:34 AM

Quote:

Originally Posted by walterbyrd
Oddly, the /etc/fstab setting were the same in both aspen and spruce. But the script ran on aspen, but not on spruce. Go figure.

That depends on if the script was in the /home in spruce. It also depends how you launched the script, i.e. ./script or bash ./script.


All times are GMT -5. The time now is 05:51 AM.