LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-03-2002, 05:56 AM   #1
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434
Blog Entries: 1

Rep: Reputation: 55
/bin/.: Permission denied


Hi I'm trying to execute a script as user int the current shell and when I do the following

. ./etc/profile.d/myconfigure.sh

I get this output

/bin/.: Permission denied

Even if I do "chmod 777 /bin/." as superuser it keeps telling me that I cannot execute the script as I want to.
Do you know how can I change the permissions for that?
thnx.
Aizkorri.
 
Old 10-03-2002, 06:25 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Quote:
Hi I'm trying to execute a script as user int the current shell and when I do the following

. ./etc/profile.d/myconfigure.sh
Try without the second dot:

. /etc/profile.d/myconfigure.sh

Hope this helps.
 
Old 10-03-2002, 06:41 AM   #3
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434

Original Poster
Blog Entries: 1

Rep: Reputation: 55
It returns the same permission problem. help!
 
Old 10-03-2002, 06:50 AM   #4
sandy
Member
 
Registered: Aug 2002
Location: Mumbai,India
Distribution: Linux Mint 12, Gentoo
Posts: 230

Rep: Reputation: 30
Quote:
Originally posted by aizkorri
It returns the same permission problem. help!
Will you please post the shell script if it is not too longer?
 
Old 10-03-2002, 08:48 AM   #5
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434

Original Poster
Blog Entries: 1

Rep: Reputation: 55
It's very simple:

PATH="$PATH:/usr/bin/"
DATA_FILE=/usr/lib/DATA_FILE
export DATA_FILE PATH
 
Old 10-03-2002, 02:49 PM   #6
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Are you logged in as a regular user? Then, do you have the correct rights to access /etc/profile.d/myconfigure.sh and access the directory it is in ? (/etc/profile.d) ?

I copied/pasted your script to my home-dir and there's no problem if I do:

cd ~
. ./myconfigure.sh

...so it has probably to do with your rights as a regular user to the directory or the file.

Agur,

Hko
 
Old 10-04-2002, 03:41 AM   #7
sandy
Member
 
Registered: Aug 2002
Location: Mumbai,India
Distribution: Linux Mint 12, Gentoo
Posts: 230

Rep: Reputation: 30
I think the problem is in the third line. Just check for the permissions of the shells /bin/bash and /bin/sh since export is a command in the bash and sh shell
 
Old 10-04-2002, 08:10 AM   #8
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434

Original Poster
Blog Entries: 1

Rep: Reputation: 55
thnx, I will check the permissions of the file and shells.
agur.
 
Old 03-17-2010, 01:17 PM   #9
cole42
LQ Newbie
 
Registered: Mar 2008
Posts: 4

Rep: Reputation: 0
type;
env | grep SHELL

running csh or bash? if it's csh that's your problem.

hit this one myself today, my user is using csh when I thought it was bash...
 
Old 03-17-2010, 01:33 PM   #10
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by aizkorri View Post
It's very simple:

PATH="$PATH:/usr/bin/"
DATA_FILE=/usr/lib/DATA_FILE
export DATA_FILE PATH
Does the script have

Code:
#!/bin/sh
as its very first line ?
 
  


Reply



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
su: /bin/bash: Permission denied dwarf007 Linux - General 10 01-20-2006 04:32 PM
/bin/sh:texis.T: Permission denied rl5 Linux From Scratch 1 04-03-2004 01:13 PM
Cannot execute /bin/bash: Permission denied Hegemon Linux - General 4 01-19-2004 04:13 AM
/bin/sh Permission Denied vi0lat0r Linux - Newbie 1 08-26-2003 07:46 AM
cannot execute /bin/bash: Permission Denied peeples Linux From Scratch 24 10-25-2002 08:07 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:08 PM.

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