Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On my Media Temple DV 4.0 server I am getting permission denied errors:

-bash: cd: httpdocs: Permission denied

If I switch from my login user to sudo (sudo su) or switch to root using su-, I can access the directory with any issue. This is just my site's files directory though so not sure why I'm being denied.

Additionally, I added my user to the visudo commands file with:

user ALL=(ALL) ALL

Any suggestions to what else could be the issue?

share|improve this question

1 Answer 1

Check the permissions on the directory and change them if necessary.

share|improve this answer
    
by MT - and Plesk standards, all directories created are owned by the FTP user. with drwxr-xr-x permissions. This is standard - surprising it would need any alternative. In either case, why can't a user with sudo priviledges = ALL be able to access it? –  JM4 Dec 3 '12 at 22:15
1  
sudo only allows a user to become root and bypass permissions, it does NOTHING in terms of allowing a normal user to bypass permissions. –  mdpc Dec 3 '12 at 22:19
    
perhaps I misunderstood but what is the point of giving a user ALL privileges in the sudoers file then? –  JM4 Dec 3 '12 at 22:23
1  
so you do not have to login directly as the root user. A log entry is made of which user upped their permissions to root and if used properly the command that was executed. I'd read the sudo man page. –  mdpc Dec 3 '12 at 22:26
1  
@JM4 you appear to have a fundamental misunderstanding of what sudo does. It DOES NOT "apply privileges to a user". It is a program which allows users to run commands under another UID (usually root, UID 0). The entries in the sudoers file specify what programs may be run using the sudo command, and the conditions under which they may be run. The problem you are reporting in your question, as mdpc correctly pointed out, is the result of directory permissions being set incorrectly. –  voretaq7 Dec 4 '12 at 0:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.