You are not logged in.

#1 2006-09-21 17:58:28

giddygiddyBA
Member
From: Montreal
Registered: 2004-12-30
Posts: 66

zsh permission problem

I just added a new partition for my /home folder and copied everything over.  Somehow my permissions are all screwed up.

When i try to compile a Script in my folder I get

zsh: permission denied: SCRIPT_NAME  (I am using zsh)

Permissions look fine, everything is set to 644 and all scripts are executable, It seems that I lost my permission to run scripts in my home folder...

How can I fix this?

Thanks.

Offline

#2 2006-09-21 19:37:28

chrismortimore
Member
From: Edinburgh, UK
Registered: 2006-07-15
Posts: 655

Re: zsh permission problem

Scripts should have the executable bit set, ie, have their permissions as 755 (or something similar).  You'll need to change your script permissions.


Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB Maxtor DiamondMax 10, 2x320GB WD Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB IBM TravelStar, Nvidia 5200Go 64MB

Offline

#3 2006-09-21 19:44:10

giddygiddyBA
Member
From: Montreal
Registered: 2004-12-30
Posts: 66

Re: zsh permission problem

Hi,  the executable bit is set already

i still have the same problem

Thanks for your reply

Offline

#4 2006-09-21 19:57:52

giddygiddyBA
Member
From: Montreal
Registered: 2004-12-30
Posts: 66

Re: zsh permission problem

I just tried changing my shell to bash

I get this error now

-bash: SCRIPT_NAME: /usr/bin/env: bad interpreter: Permission denied  (for scripts using env)

and the same error but with /usr/bin/sh for bash scripts

Offline

#5 2006-09-21 22:20:33

giddygiddyBA
Member
From: Montreal
Registered: 2004-12-30
Posts: 66

Re: zsh permission problem

also

bash/python/ruby/sh SCRIPT_NAME

works fine

it has to do with env and the #!/path/to/prog   at the start of each script

Offline

#6 2006-09-21 22:22:27

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: zsh permission problem

/usr/bin/sh does not exist.  /bin/sh does.  Check the path - it needs to be valid to work

Offline

#7 2006-09-21 22:26:17

noriko
Member
From: In My Mind
Registered: 2006-06-09
Posts: 535
Website

Re: zsh permission problem

yes it certainly appears to be the 'env' binary...
i'd recommend maybe,

running the env command to see if it werks.
or
checking the permissions on it or something.


[edit++]

also i did some google searches on the issue, many people have encountered such errors, and it appears that there may be an issue with the file permissions on SCRIPT_NAME ... also there may be an end of lien issue here if you transferred the file across different file-systems ...  you may try just replacing the white space at the end of the file with new line in ur editor...

hope all goes well smile


The.Revolution.Is.Coming - - To fight, To hunger, To Resist!

Offline

#8 2006-09-21 23:13:00

giddygiddyBA
Member
From: Montreal
Registered: 2004-12-30
Posts: 66

Re: zsh permission problem

thanks for the help guys

yea sorry its /bin/sh... that was a typo

env works fine, permissions on env are ok

The new partition is ext3, the existing was reisferfs so i did copy the files across different file systems

I tried replacing white spaces, but still the same error

man this is strange...

Offline

#9 2006-09-22 02:44:21

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: zsh permission problem

Just a guess: that partition is mounted with 'noexec' or 'user(s)'?


1000

Offline

#10 2006-09-22 11:41:58

giddygiddyBA
Member
From: Montreal
Registered: 2004-12-30
Posts: 66

Re: zsh permission problem

Hey byte, your right!

it was my mounting options

I had ext3 defaults,user

but i needed to add 'exec'

I thought the 'exec' bit was covered with 'defaults' but i guess not...

Thanks again everyone!

Offline

#11 2006-09-23 02:43:16

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 130

Re: zsh permission problem

defaults implies exec, but then user implies noexec...

Offline

Board footer

Powered by FluxBB