VectorLinux
August 22, 2014, 03:24:16 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Finally SOLVED] Permission denied  (Read 1937 times)
StrayBit
Vectorite
***
Posts: 373



« on: January 26, 2013, 10:28:11 am »

I have VL7.0 on another partition.

All these files are owned by bruce:
Quote
Dell://mnt/Code/Info/Curses/samples
bruce:$ dir
alphalist.sh  entry.sh     label.sh   radio.sh   selection.sh  viewer.sh
calendar.sh*  fselect.sh   matrix.sh  scale.sh   slider.sh
dialog.sh     itemlist.sh  mentry.sh  scroll.sh  template.sh
Dell://mnt/Code/Info/Curses/samples
bruce:$ ./calendar.sh
bash: ./calendar.sh: Permission denied
Dell://mnt/Code/Info/Curses/samples
bruce:$
The same thing happens with ./configure in another directory - even after su.

Any idea what I've done this time?

edit: In Vl6, I get
Quote
bruce:$ ./calendar.sh
bash: ./calendar.sh: /bin/sh: bad interpreter: Permission denied
« Last Edit: January 31, 2013, 09:05:54 am by StrayBit » Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
bigpaws
Vectorian
****
Posts: 1846


« Reply #1 on: January 26, 2013, 10:48:23 am »

Have you used ls -la checking for owner:group and
file permissions.

Bigpaws
Logged
StrayBit
Vectorite
***
Posts: 373



« Reply #2 on: January 26, 2013, 12:13:28 pm »

Quote
bruce:$ ls -la
total 67
drwxr-xr-x 2 bruce bruce  528 2013-01-26 11:31 ./
drwxr-xr-x 5 bruce bruce 2104 2013-01-26 11:36 ../
-rw-rw-rw- 1 bruce bruce 2284 2005-12-27 09:04 alphalist.sh
-rwxrwxrwx 1 bruce bruce 1578 2005-12-27 08:53 calendar.sh*
-rw-rw-rw- 1 bruce bruce 1863 2005-12-27 08:53 dialog.sh
-rw-rw-rw- 1 bruce bruce 1018 2005-12-27 08:53 entry.sh
-rw-rw-rw- 1 bruce bruce 1543 2005-12-27 10:56 fselect.sh
-rw-rw-rw- 1 bruce bruce 2544 2005-12-27 08:53 itemlist.sh
-rw-rw-rw- 1 bruce bruce 1471 2005-12-27 08:53 label.sh
-rw-rw-rw- 1 bruce bruce 2012 2005-12-27 10:07 matrix.sh
-rw-rw-rw- 1 bruce bruce 1041 2005-12-27 08:53 mentry.sh
-rw-rw-rw- 1 bruce bruce 1823 2005-12-27 08:53 radio.sh
-rw-rw-rw- 1 bruce bruce 1062 2005-12-27 08:53 scale.sh
-rw-rw-rw- 1 bruce bruce 2510 2005-12-27 08:53 scroll.sh
-rw-rw-rw- 1 bruce bruce 3574 2005-12-27 10:56 selection.sh
-rw-rw-rw- 1 bruce bruce 1076 2005-12-27 08:53 slider.sh
-rw-rw-rw- 1 bruce bruce 1109 2005-12-27 08:53 template.sh
-rw-rw-rw- 1 bruce bruce 1434 2005-12-27 08:53 viewer.sh
Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
retired1af
Packager
Vectorian
****
Posts: 1258



« Reply #3 on: January 26, 2013, 12:16:34 pm »

What happens if you touch the file and then try to run the script again?
Logged

ASUS K73 Intel i3 Dual Core 2.3GHz
bigpaws
Vectorian
****
Posts: 1846


« Reply #4 on: January 26, 2013, 12:28:47 pm »

Have you tried sh program.sh vs ./program.sh?

Bigpaws
Logged
overthere
Vectorian
****
Posts: 1270



« Reply #5 on: January 26, 2013, 05:36:36 pm »

Are these executable scripts and are they still such. I have moved scripts and had to make them executable again.
Logged

Everything Is Relative
StrayBit
Vectorite
***
Posts: 373



« Reply #6 on: January 27, 2013, 11:17:21 am »

Quote
bruce:$ sh calendar.sh
calendar.sh: line 62: ../cdkcalendar: No such file or directory
cat: /tmp/cal.3733: No such file or directory
calendar.sh: line 84: ../cdklabel: No such file or directory
Dell://mnt/Code/Info/Curses/samples
bruce:$ ./calendar.sh
bash: ./calendar.sh: /bin/sh: bad interpreter: Permission denied
Dell://mnt/Code/Info/Curses/samples
bruce:$ touch calendar.sh
Dell://mnt/Code/Info/Curses/samples
bruce:$ ./calendar.sh
bash: ./calendar.sh: /bin/sh: bad interpreter: Permission denied
Repeating
Quote
bruce:$ ls -la
total 67
drwxr-xr-x 2 bruce bruce  528 2013-01-26 11:31 ./
drwxr-xr-x 5 bruce bruce 2104 2013-01-26 11:36 ../
-rw-rw-rw- 1 bruce bruce 2284 2005-12-27 09:04 alphalist.sh
-rwxrwxrwx 1 bruce bruce 1578 2005-12-27 08:53 calendar.sh*
/mnt/Code is a separate partition formated reiserfs so I don't have to copy.

edit 14:22 Thinking about what I had just posted, I looked into calendar.sh and found
Code:
#
# Create some global variables.
#
CDK_CALENDAR="${CDK_BINDIR=..}/cdkcalendar"
CDK_LABEL="${CDK_BINDIR=..}/cdklabel"
So, what I've got to do is find where cdkcalendar, et al are and adjust these labels accordingly.

Thanks to you all for your support.

« Last Edit: January 27, 2013, 01:02:35 pm by StrayBit » Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
StrayBit
Vectorite
***
Posts: 373



« Reply #7 on: January 30, 2013, 05:57:59 am »

The preceeding were trying to run a script file.  I've run into the same thing with an executable file:
Quote
Dell://mnt/Code/Info/Curses/examples
bruce:$ ls -la fse*
-rwxrwxrwx 1 bruce bruce 104499 2013-01-14 10:19 fselect_ex*
-rw-rw-rw- 1 bruce bruce   9075 2012-03-22 03:25 fselect_ex.c
Dell://mnt/Code/Info/Curses/examples
bruce:$ ./fselect_ex
bash: ./fselect_ex: Permission denied
Dell://mnt/Code/Info/Curses/examples
bruce:$ cd
Dell:/~
bruce:$ ls -la fse*
-rwxr-xr-x 1 bruce bruce 104499 2013-01-14 10:19 fselect_ex*
-rw-r--r-- 1 bruce bruce   9075 2012-03-22 03:25 fselect_ex.c
Dell:/~
bruce:$ ./fselect_ex
(I copied the two files to ${HOME}/bruce using thunar before cd.) 

I don't quite understand it: Code is owned by root and group bruce has rw privileges.  All directories in Code are owned by bruce.  Chown bruce Code did not make a difference.
Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
rbistolfi
Packager
Vectorian
****
Posts: 2282


« Reply #8 on: January 30, 2013, 06:10:49 am »

Is possible that the partition mounted in /mnt/Code is mounted with noexec option ?
Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
StrayBit
Vectorite
***
Posts: 373



« Reply #9 on: January 30, 2013, 08:35:34 am »

Would that be implied with
Code:
/dev/sdb3 /mnt/Code  reiserfs  defaults,user  0  2
Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #10 on: January 30, 2013, 01:09:49 pm »

Would that be implied with
Code:
/dev/sdb3 /mnt/Code  reiserfs  defaults,user  0  2
adding user after defaults turns noexec on you need it this awy
Code:
/dev/sdb3 /mnt/Code  reiserfs  defaults,user,exec  0  2
Logged
StrayBit
Vectorite
***
Posts: 373



« Reply #11 on: January 31, 2013, 09:05:28 am »

Thanks, Uels.  That did it. I can now run the examples with out having to copy to my home directory.
Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!