Help request. FTP user to var/www/html | Unix Linux Forums | Debian

  Go Back    


Debian Debian GNU/Linux is a free distribution of the GNU/Linux operating system.

Help request. FTP user to var/www/html

Debian


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-04-2013
Pinkfloyd Pinkfloyd is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 4 February 2013, 6:24 AM EST
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Help request. FTP user to var/www/html

Hi all.

I appologise this is my first post, I will gladly have a further look around to see if this has been posted elsewhere, but so far it has not, or it doesnt quite explain in full what I need. If anyone here can help me out, I would really appreciate this. I want to make sure I do this right, as in the past I made a huge error and messed up my server.

I have two servers.

1, is our online dedicated server for mainly gaming, but I also use it as a hosting site for very basic webpages and a forum. This is on Centos 5.
2, My second server is a raspberry PI which I am using to test and learn from which is on Debian at home. Both servers are setup with just CLI access and Webmin.

I fully understand that these are two very different distro's but I am hoping what I need to do, can apply to both. All I want to be able to do is create a user, which has full read/write access ( and also be able to change a subfolder's acess ( to 777 for example ) to the var/www ( PI ) or var/www/html ( Centos ) folders using a client FTP application from a Windows PC, such as Filezilla.

As an example from my Raspberry PI, I wanted to try this from root:


Code:
chown -R piweb:piweb /var/www/

I assume, this on Centos would be :


Code:
chown -R webuser:webuser /var/www/html

But im not so sure if this is right, or if there is a better way to do it? Any help would be great, thanks for your time.

Thanks

Last edited by Pinkfloyd; 02-04-2013 at 06:24 AM..
Sponsored Links
    #2  
Old 02-09-2013
Azrael's Avatar
Azrael Azrael is offline
Registered User
 
Join Date: Sep 2011
Last Activity: 2 October 2014, 3:30 PM EDT
Posts: 92
Thanks: 30
Thanked 3 Times in 3 Posts
From the man page on chown:

Quote:
-R, --recursive
operate on files and directories recursively
This means you gave ownership privledges to "piweb" and "webuser" to /var/www and all its sub-directories. If this is what you are trying to accomplish.

To check which user owns the files use this:

Code:
ls -l

This will show the user who owns the files in the current directory.

The syntax you have used is correct for Debain and CentOS. However, you can shorten this by using this:

Code:
chown -R piweb. /var/www/

Instead of:

Code:
 chown -R piweb:piweb /var/www/

If you need to change permissions on files or directories you will need to use chmod instead of chown. I should warn you that using 777 permissions on a file viewable to the web is very dangerous. You would be giving the entire Internet read, write, and execute permissions on these files which is a huge security risk. I would strongly suggest using 755 or 644 permissions instead which should allow you the same functionality, but with better security.

If you want full read, write, and execution access remotely it would be far safer to use SSH or VNC with a user and then login to root. However, for the purposes of FTP this you should be fine with just using 755 and 644.

Last edited by Azrael; 02-09-2013 at 11:41 AM.. Reason: Emote tranucated my text
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to protect directory var/www in debian? azzeddine2005 UNIX for Dummies Questions & Answers 6 12-03-2012 12:44 PM
Permissions of the folder var/www aneuryzma UNIX for Dummies Questions & Answers 4 09-21-2010 08:01 PM
var/www/html permissions JPA Web Programming 0 12-24-2009 07:51 AM
New SEO Experiment http://www.globalfactbook.com/index.html Neo Web Programming 1 07-14-2008 11:03 AM
resize /var/www (debian) seagonus UNIX for Advanced & Expert Users 3 12-17-2007 07:36 AM



All times are GMT -4. The time now is 01:55 PM.