LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-26-2007, 02:14 PM   #1
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
cd command, file permissions.


when you try to "execute" a directory, shouldn't it really just do a CD, considering the meaning of x permission on a dir?

Code:
hostname:/home/jameson/% ham
ham: Permission denied.
 
Old 06-26-2007, 02:46 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
The execute permission for a directory make a user to search through that directory or make that directory the current one. But not without typing the cd command. If I remember well, such a feature is implemented in zsh, not in bash.
 
Old 06-26-2007, 02:56 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I can't see what command you tried to issue--is "ham" a directory or what????

If I try to "execute" a directory, it tells me the command is not found.

Execute priveleges on a directory mean that you are allowed to enter it and make changes--otherwise execute has no real meaning.
 
Old 06-26-2007, 03:47 PM   #4
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Original Poster
Rep: Reputation: 211Reputation: 211Reputation: 211
Quote:
If I remember well, such a feature is implemented in zsh, not in bash.
Seemed likely... zsh is pretty hip. However:
Code:
[jameson@whiteout]~% echo $SHELL
/usr/sbin/zsh
[jameson@whiteout]~% ls
Desktop  first_week  mail  scripts
[jameson@whiteout]~% scripts
zsh: permission denied: scripts
no such luck.

(scripts has 775 permissions)
 
Old 06-26-2007, 04:01 PM   #5
dawkcid
Member
 
Registered: May 2007
Location: UK
Distribution: LFS,Slackware,Slamd64,NetBSD
Posts: 102

Rep: Reputation: 15
setopt autocd

man zshoptions:

Quote:
AUTO_CD (-J)
If a command is issued that can't be executed as a normal command, and the command is the name of a directory, perform the cd command to that directory.
 
Old 06-26-2007, 04:07 PM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
dawkcid got the point: in newer versions of zsh, option autocd is set by default. You can check if you have it enabled by typing setopt without arguments.
 
  


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
CP Command >> Permissions Feren6 Linux - Newbie 7 02-01-2006 03:33 PM
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM
command permissions zchoyt Linux - Newbie 1 05-20-2005 07:14 PM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 05:35 AM
Changing file permissions on a SAMBA file share apenney Linux - Software 0 02-11-2002 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:42 AM.

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