Fedora Linux Support Community & Resources Center
  #1  
Old 11th September 2012, 09:04 PM
celso_suzuki Offline
Registered User
 
Join Date: May 2005
Location: Brazil
Posts: 6
linuxfirefox
bash: /home/celso/bin/suvts: Permission denied

Hi,

I upgrade my box from Fedora 16 to Fedora 17.
Now, all my scripts, that runned at F16 is not working ....
Detail, they are in a NFS File system.

sfw3:/home4 /home4 nfs exec,dev,suid,rw,noauto,user 0 0


I already tried remount the FS

mount -o remount,exec /home4

When i execute

bash test.sh it runs.

Any ideia ?

Thanks in advance

Celso Suzuki
Reply With Quote
  #2  
Old 11th September 2012, 10:15 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 32
Posts: 2,771
linuxfirefox
Re: bash: /home/celso/bin/suvts: Permission denied

What does "ls -l /home/celso/bin/suvts" actually list the permissions as?
Reply With Quote
  #3  
Old 12th September 2012, 03:55 PM
celso_suzuki Offline
Registered User
 
Join Date: May 2005
Location: Brazil
Posts: 6
linuxfirefox
Re: bash: /home/celso/bin/suvts: Permission denied

[celso@sfw06 ~]$ ls -l /home/celso/bin/suvts
lrwxrwxrwx 1 celso celso 6 Set 7 2007 /home/celso/bin/suvts -> CnxRem
[celso@sfw06 ~]$ ls -l /home/celso/bin/CnxRem
-rwxrwxr-x 1 celso celso 3375 Jul 13 2011 /home/celso/bin/CnxRem
[celso@sfw06 ~]$ ls -l /home/celso|grep bin
lrwxrwxrwx. 1 celso celso 16 Jun 3 2011 bin -> /home2/celso/bin
[celso@sfw06 ~]$ ls -l /home2/celso/|grep bin
drwxr-xr-x 2 celso celso 12288 Ago 16 17:00 bin
[celso@sfw06 ~]$ ls -l /|grep home2
drwxr-xr-x 224 root 513 12288 Set 5 09:11 home2
sfw31.dti.digitro.com.br:/home3/ nfs 146561600 137402816 1714496 99% /home2
[celso@sfw06 ~]$ suvts 102
bash: /home/celso/bin/suvts: Permission denied

[celso@sfw06 ~]$ more /home/celso/bin/suvts
#!/bin/bash
# Script geral para conexao remota
# Atende ssh e rlogin
################################################## ########
User=axs
User2=celso
Log=rlogin



[celso@sfw06 bin]$ xx
bash: ./xx: Permissão negada
[celso@sfw06 bin]$ more xx
#!/bin/bash

echo "Teste"

---------- Post added at 11:55 AM ---------- Previous post was at 09:09 AM ----------

in file /etc/fstab

sfw31.dti.digitro.com.br:/home3 /home2 nfs exec,dev,suid,rw,noauto,user 0 0
Reply With Quote
  #4  
Old 12th September 2012, 09:16 PM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 2,078
linuxfirefox
Re: bash: /home/celso/bin/suvts: Permission denied

Code:
ls -l /bin/bash
and please don't use rlogin for conexao remota!
Reply With Quote
  #5  
Old 13th September 2012, 12:17 PM
celso_suzuki Offline
Registered User
 
Join Date: May 2005
Location: Brazil
Posts: 6
linuxfirefox
Re: bash: /home/celso/bin/suvts: Permission denied

[celso@sfw06 SVN]$ ls -l /bin/bash
-rwxr-xr-x 1 root root 902036 Jul 24 05:38 /bin/bash

The bash works.
If I ran the script at local directory, it works.
Only when I ran at NFS FS it didn't work .....
Reply With Quote
  #6  
Old 13th September 2012, 12:58 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,865
linuxfirefox
Re: bash: /home/celso/bin/suvts: Permission denied

Having dev,suid on an NFS mount is opening a security hole by allowing other systems to create setuid files (and device references) that are not under the control of the system.

Devices are a bigger problem as they may allow device control that is not allowed by the system.
Reply With Quote
  #7  
Old 13th September 2012, 01:31 PM
celso_suzuki Offline
Registered User
 
Join Date: May 2005
Location: Brazil
Posts: 6
linuxfirefox
SOLVED - Re: bash: /home/celso/bin/suvts: Permission denied

Hi,

I found the problem.

I mount the FS with these options exec,dev,suid,rw,noauto,user to let me mount without be root.
I tried to mount manually, as root, and the scripts run. So i tried as my user, and it didn't run.
So I changed the user option to the first option and it works !!

The options are now user,exec,dev,suid,rw,noauto

Strange ...

But it works .....


Thanks every body !!!
Reply With Quote
  #8  
Old 13th September 2012, 02:29 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,865
linuxfirefox
Re: bash: /home/celso/bin/suvts: Permission denied

And you still have the security problems with dev and suid

---------- Post added at 09:29 AM ---------- Previous post was at 08:56 AM ----------

FYI: I did a little checking in the manpage for mount:

Code:
users  Allow  every  user  to  mount  and unmount the filesystem.  This
              option implies the options noexec,  nosuid,  and  nodev  (unless
              overridden   by  subsequent  options,  as  in  the  option  line
              users,exec,dev,suid).
These defaults are for safety, though frequently the "noexec" is overridden.
Reply With Quote
  #9  
Old 13th September 2012, 06:47 PM
celso_suzuki Offline
Registered User
 
Join Date: May 2005
Location: Brazil
Posts: 6
linuxfirefox
Re: bash: /home/celso/bin/suvts: Permission denied

Hi,

Ok, I'll change the line of fstab.

Thanks for the tip.
Reply With Quote
Reply

Tags
bash, denied, f17, permission

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: .ssh/authorized_keys: Permission denied settingsun Servers & Networking 2 16th February 2012 10:19 PM
bash: /bin/su: Permission denied Slyke Using Fedora 7 29th January 2010 02:30 PM
bash: ./configure: Permission denied mrHappyPants Using Fedora 2 11th April 2009 09:05 AM
Why do I get permission denied on a bash script ? OralDeckard Using Fedora 5 28th August 2007 12:42 AM
'/bin/bash': Permission Denied SupadudeX Using Fedora 9 17th November 2006 01:55 AM


Current GMT-time: 08:47 (Tuesday, 21-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Lubliniec Travel Photos - Laguna Woods - Mazarron Instagram Photos