I have created an ftp user on my CentOS server.

Now I can log in remotely via ftp using my username and password, see all the directory listings (not limited/jailed) to any directory, but I cannot create a new folder.

When I want to create a new directory, it fails:

550 Create directory operation failed

Note, that I have done the following (when logged in as root):

chmod 775 as well as chmod 777

as the root user on the server itself(using putty).

NOTE: The folder I want to write to is: /var/www/html

How do I get write access to a specific folder for an FTP user?

I see that I currently have the following permissions:

drwxr-xr-x. 6 dextrousdave root 4096 Jul  7 22:30 html

As far as I can see from ls you are missing w mark on group permissions. It's like 755 on html folder

try as root with:

chmod 766 -R /var/www/html

it should be drwxrw-rw- dextrousdave root 4096 Jul 7 22:30 html
and if you need execute too than do:

chmod +x /var/www/html


chmod 777 -R /var/www/html
  • Cool thank you. But when the user now has access to the /var/www/html folder, will that pose a security threat - Like will he be able to have access up the directory tree (var folder for example)? – DextrousDave Jul 8 '13 at 9:43
  • you can check permissions for ls -lh /var/www, so if it's -rw-r--r-- you are safe :) But will have permissions to delete everything in html/ dir :| – mirkobrankovic Jul 8 '13 at 9:57
  • one more thing, how do i remove the permisisons for a user? – DextrousDave Jul 8 '13 at 11:20
  • 1
    remove him from all groups that can read/write to html folder with usermod -G groups,comma,delimited username read HERE – mirkobrankovic Jul 8 '13 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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