Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

chmod problem

Status
Not open for further replies.

municipal

Programmer
Jan 1, 2001
62
IL
Hi
I have a root eqivalent permission but when i create a file it is not executable and i can not change it to executable.

look down at the "ls" and "chmod" reply.
any suggestion??
TIA
-rw-rw-r-- 1 guy aaaaagroup 6 Apr 24 14:51 aa
kti:/u/guy: rm aaa
kti:/u/guy: chmod 777 aa
chmod: 777: No such file or directory
 
You can't chmod a file that doesn't exist.
Put the file where you want it, then chmod (don't bother with the rm) Ian

"IF" is not a word it's a way of life
 
Hi
here is more clarification
in .profile i found the sentece and i dont want to change it
alias -x chmod="sudo /usr/ucb/chmod 664"

The file exist
to any chmod with 777 i get the reply:
chmod: 777: No such file or directory
 
It looks to me like you have aliased your chmod command to use a default of 664, i.e. when you type chmod, what you are actually doing is sudo /usr/ucb/chmod 664 <parameters>

So when you do chmod 777 aaa, you're doing -
sudo /usr/ucb/chmod 664 777 aaa

The command is therefore looking for a file called 777 which doesn't exist.

I don't you why you have chmod aliased in this way?? but if you want to use the standard chmod, then you'll need to either ...

1) use the full path, so /usr/ucb/chmod 777 aaa should work

2) create another alias in your .profile to only so a chmod, e.g. alias -c mychmod=&quot;sudo /usr/ucb/chmod&quot;

Greg.
 
... excuse the errors in the above post .. but you know what I mean :)

Greg.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top