Giving Privileges to Directory /var/www to Filezilla – Ubuntu 12.10

Hi, good day everyone!

Today I was finally setting up my Filezilla in my full Ubuntu 12.10 server, and obviously things are a bit different in this OS. For example, even though I installed Filezilla in my computer this does not means that Filezilla has privileges to any folder, either in the root.

For Windows Environment, everything that’s in the root does no required authentication from the system, not this way in Ubuntu.

Traditionally, when you install Apache in Unbuntu, Apache creates a directory in the File System or root named “var” and every public files available from the browser is stored in “/var/www”.

Now, Filezilla or any other software natively does not have any privilege to write to any directory only in “/usr/share” directory. To allow Filezila to communicate with “/var/www” you need to allow it first, this by creating an user for your ftp purposes.

To make it easy for me, what I did is that I create an user that’s call exactly as my hosting environment and allowing access to this user into the root directory “/var/www/”, this way I’m not allowing the software, but the user the software uses to write to this directory.

How I did this, first you need to open your terminal with:

Ctrl+Alt+T

With this done enter a sudo code that will be used in your current open session:

sudo su

Enter the password you setted up when installed Ubuntu if you are the administrator. With this done you need to create an user using useradd.

useradd yourhostinguser -p yourhostingpassword -d /var/www -s /bin/false

Now you have to add this user to your system:

passwd yourhostinguser

The system will ask you for the password:

Enter new Unix password:

Enter –yourhostingpassword when submitted will ask you to re-confirm the password:

Retype new Unix password:

Enter the password again and submit by click [ENTER].

That’s it, you now have access to the directory with Filezilla, as long as you use the same user and password for the hosting service you are using.

Downside is that you need to create a new user if you have more than one users in you hosting, to have this user only access to the specify directory to that user.

Well, I hope this help. Happy Coding!

If you need to learn how to install Apache, PHP and MySQL in Ubuntu 12.10 subscribe to this Designer’s Gate to receive my free PDF tutorial on how to install this bundle, in just one tutorial:

This entry was posted in Tips and tagged , , , , , , , by Rafael Vila. Bookmark the permalink.

About Rafael Vila

I'm a Son of God, Father of three extremely awesome sons, husband of my sweetie pie Estella. I work as a Graphic Designer and a Web Developer in a Texan Company called Stealth Products, Inc. I've been blessed with a beautiful family and a great community of Faith. I believe God is the only God, who sent his son Jesus who become our Saviour and Redeemer Christ. The mercy and compassion of God is my daily wonder.