Unable to run files with 700-777 permissions


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unable to run files with 700-777 permissions
# 1  
Old 02-06-2014
Unable to run files with 700-777 permissions

I finally installed Chakra Linux and noticed whether I create or extract a file with 700, 755, 775 permissions a * sign is listed at the end of the filename:
Code:
[user@mybox bitcoin-0.8.6-linux]$ ls -l bin/32 
total 16440 
-rwxr-xr-x 1 501 utmp  6321496 09.12.2013 04:02 bitcoind* 
-rwxr-xr-x 1 501 utmp 10508613 09.12.2013 04:02 bitcoin-qt*

When I try to run these files I get an error that they do not exist:

Code:
[user@mybox bitcoin-0.8.6-linux]$ bin/32/bitcoin-qt  
bash: bin/32/bitcoin-qt: No such file or directory  

[user@mybox bitcoin-0.8.6-linux]$ bin/32/bitcoin-qt* 
bash: bin/32/bitcoin-qt: No such file or directory

I even tried using an escape, but no such luck:

Code:
[user@mybox bitcoin-0.8.6-linux]$ bin/32/bitcoin-qt\*  
bash: bin/32/bitcoin-qt*: No such file or directory

Any suggestions?
# 2  
Old 02-06-2014
Read your error report...
You need the absolute path...
Code:
/bin/32/bitcoin-qt*

EDIT:
OR...
Code:
/full/path/to/bin/32/bitcoin-qt*

NOTE:
On CygWin a file with a star at the end can exist and be part of that filename.
However you may be using an alias for ls that is doing the same as ls -lF...

Last edited by wisecracker; 02-06-2014 at 10:45 AM.. Reason: Added the EDIT section.
# 3  
Old 02-06-2014
The * is probably not part of the filename.

It does not know where to find the file, because it does not search from the current path for security reasons.

To tell it to search from the current path, prefix the filename with ./

like ./path/to/file
# 4  
Old 02-06-2014
Quote:
Originally Posted by wisecracker
Read your error report...
You need the absolute path...
Code:
/bin/32/bitcoin-qt*

The original ls is using a relative path. Using the absolute path you suggest will lead to a different directory if the current working directory of the relative path is anything other than /.


Quote:
Originally Posted by Corona688
It does not know where to find the file, because it does not search from the current path for security reasons.

To tell it to search from the current path, prefix the filename with ./
This is not a PATH issue, since PATH is not used when the command name contains slashes.

Regards,
Alister
This User Gave Thanks to alister For This Post:
# 5  
Old 02-06-2014
Tried it and sure enough... Thanks for teaching me something new.
# 6  
Old 02-06-2014
To the OP:

To exec a file, not only must it have the executable mode/permissions bit set, but so must all of the directories leading to it. Have you confirmed that bin, bin/32, and the directory components leading to the the current working directory (inclusive) all have the execute bit enabled?

Regards,
Alister
These 2 Users Gave Thanks to alister For This Post:
# 7  
Old 02-06-2014
Also, "no such file or directory" can sometimes mean "can't find all the libraries it needs" or "wrong file type", so ldd executablename and see if anything's missing.
These 4 Users Gave Thanks to Corona688 For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Permissions to run ZFS Snapshots

Hi, I work as an Oracle Technical consultant (mainly DBA related), and I have used ZFS snapshots on previous projects which has helped me a great deal. I often take snapshots before doing some dev work, and then I can roll it back if I want to start again, or if it goes pear shaped!! I have... (4 Replies)
Discussion started by: AndyG
4 Replies

2. Solaris

Unable to delete directory even with 777 perm

Hi, I have an 'empty' directory 'tmp' of which I am the owner and 777 permission. But when I try to delete the directory using rmdir or rm command, it gives error. Command prompt snapshot: => uname SunOS ... (4 Replies)
Discussion started by: platinum81
4 Replies

3. AIX

find command to list all the 777 files and directories owned by root user

Hi I'm logged in to an AIX box now and we need to do an audit on this box. cbssapr01:# pwd / Which command will show all the files and directories owned by root user with permissions as 777 ? (8 Replies)
Discussion started by: newtoaixos
8 Replies

4. Shell Programming and Scripting

777 files and dir

i have four files that have 777 permission find /var/tttt/ -type f -perm 0777 /var/ttt/1 /var/ttt/2 /var/ttt/3 /var/ttt/4 if any file other than above 4 have 777 permission then move that file to /garbage/yyyy-mmm-dd . Also email me that this have abcd have 777 permission. (6 Replies)
Discussion started by: learnbash
6 Replies

5. Cybersecurity

Unable to run 'su' and 'sudo' after changing permissions on /etc

Hello, I'm running rhel6 64bit. Accidentally I ran % chmod -R 777 /etc and after that I have a problem to do 'su' or 'sudo'. When I did sudo it complained that /etc/sudoers has 777 while it should be 0440. I changed that and also restored right permission for: -rw-r--r-- 1 root root 1966 May 19... (2 Replies)
Discussion started by: susja
2 Replies

6. Cybersecurity

can another user 777 and existing 777 dirctory?

User usrA creates dirA directory and runs chmod 777 on the directory. Can usrB issue another 777 on dirA? It appears the answer is no even if the usrA and usrB are part of the same group. I know this is a rare scenario but I just ran across it and found out that usrB receives an error when... (4 Replies)
Discussion started by: zlek131
4 Replies

7. Shell Programming and Scripting

find and tar 700 files

i have some 700 files of the same pattern differing only in their datestamp. below some of the files. i want to tar them all into one tar file.but the below normal command is telling me "arg list too long" tar -cvf Archive1.tar CurrentCollectorMeterReadBackup* also i tried the below... (6 Replies)
Discussion started by: ali560045
6 Replies

8. Solaris

Unable to run xclock

Hello. I am trying to run xclock on newly built solaris box - These are the steps I followed: # DISPLAY=localhost:0.0 # export DISPLAY # xclock xclock: not found # cd /usr/openwin/bin # ./xclock Error: Can't open display: localhost:0.0 # Please suggest, what am i doing wrong? Thank... (27 Replies)
Discussion started by: panchpan
27 Replies

9. Shell Programming and Scripting

unable to run a script

thi is (10 Replies)
Discussion started by: angelina
10 Replies

10. UNIX for Advanced & Expert Users

How to run my own FTP server without root permissions

Hi all, I need your help with this problem. I have my own ftp server implemented in java. If I start it as root it is successfully binded to port 21 and everything works. Now I want to run it as non-root user, but for binding to port 21 it needs root rights. How to solve it? I alrady try... (3 Replies)
Discussion started by: giorgione
3 Replies
Login or Register to Ask a Question