LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-02-2006, 12:49 PM   #1
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Rep: Reputation: 46
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?
 
Old 03-02-2006, 01:24 PM   #2
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
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.
 
Old 03-02-2006, 01:25 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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.
 
Old 03-03-2006, 09:12 AM   #4
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Original Poster
Rep: Reputation: 46
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
 
Old 03-03-2006, 09:34 AM   #5
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xorg problems... got an odd error Nikon01 Slackware 9 08-19-2004 09:16 PM
cups odd printing problems tm_burningdog Linux - Software 1 07-17-2004 10:47 PM
An odd case of FTP file permissions paradoxlight Linux - Security 6 04-20-2003 09:40 PM
Odd Surfing Problems BittaBrotha Slackware 6 06-24-2002 09:37 PM
odd sound problems SSA Linux - Newbie 1 12-31-2001 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration