Sign in to follow this  
Followers 0
thatguyandrew1992

ubuntu Ubuntu Permissions for public_html directory

4 posts in this topic

I have a web server running ubuntu and I made the public_html dir different from the standard www directory. I did chown www-data:www-data on the public_html folder (Was that the right thing to do?)

 

Now when I ftp into the server with my user account, I guess I don't have permission anymore. I can't create a new a file for instance via ftp and in the terminal I get access denied.

 

What can I do to give my user the appropriate permissions to still create files and do other standard operations? (I wanted to ask so I don't mess up the permissions :) )

Share this post


Link to post
Share on other sites

You don't need to chown to www-data:www-data. The group permissions are redundant, since www-data will have permission as owner.

 

I'd either chown to www-data:<group your user is in> or <your user>:www-data - ensuring that you set the correct permissions too.

Share this post


Link to post
Share on other sites

You don't need to chown to www-data:www-data. The group permissions are redundant, since www-data will have permission as owner.

 

I'd either chown to www-data:<group your user is in> or <your user>:www-data - ensuring that you set the correct permissions too.

Okay so I did  "groups adminUser"

Which gave me "adminUser : adminUser"

So then I did "sudo chown -R www-data:adminUser ./public_html"

I still get Permission denied in the terminal.

Is this a permission issue with adminUser group?

Share this post


Link to post
Share on other sites

Okay I got it, I had to do the following

Add user to group www-data

chown -R www-data:www-data to the html folder

chmod g+rw to html folder

chmod +s to the html folder

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.