Sponsored Content
Operating Systems Linux Debian Help request. FTP user to var/www/html Post 302768745 by Azrael on Saturday 9th of February 2013 11:21:21 AM
Old 02-09-2013
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 12:41 PM.. Reason: Emote tranucated my text
 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

resize /var/www (debian)

I have several live websites running in the /var/www/XXXX directory. Initially when I did the Debian install I limited the web directory to 6GB. I am now outgrowing that limit. Question is: Is there a simple way to add space to the web directory??? I'd hate to have to redo the whole... (3 Replies)
Discussion started by: seagonus
3 Replies

2. Web Development

New SEO Experiment http://www.globalfactbook.com/index.html

Hi, I found out the CIA's worldfact book is has an open copyright, anyone can use it as long as we don't use the CIA shield. So, I set up an experimental SEO site to see what will happen in the search engines over time: The Global Factbook Please click above and let's see if we can... (1 Reply)
Discussion started by: Neo
1 Replies

3. Web Development

var/www/html permissions

Hi, first post. I have no Linux experience. I have an e-friend that set me up a VPS and my website with Apache and FTP access so I could upload my files the way I do it regularly with my shared hosting. The OS in the VPS is Fedora by the way. Now the thing is: http ://www.mydomain.com presents... (0 Replies)
Discussion started by: JPA
0 Replies

4. UNIX for Dummies Questions & Answers

Permissions of the folder var/www

what should be the permissions of the folder var/www in my ubuntu ? I need it to be safe and at the same time I need ftp users to be able to edit it. I was wondering if I should create a group with all permissions and add ftp users to this group in unix. what's the standard way to do it ?... (4 Replies)
Discussion started by: aneuryzma
4 Replies

5. UNIX for Dummies Questions & Answers

How to protect directory var/www in debian?

hi i need somme help to protect directory in debian with user and pass var/www thank's (6 Replies)
Discussion started by: azzeddine2005
6 Replies

6. Web Development

$_SERVER['DOCUMENT_ROOT'] directs to /var/www not ~/public_html

Hi all, Exactly like my title says. I am learning PHP and MySQL and I used to use /var/www/ to host (contain or store) my files (.htm/.php) for testing. I could configure, finally, apache2 to use ~/public_html instead. Now I when I tried to use $_SERVER it still directs (I used echo to show... (7 Replies)
Discussion started by: faizlo
7 Replies
DH_FIXPERMS(1)                                                       Debhelper                                                      DH_FIXPERMS(1)

NAME
dh_fixperms - fix permissions of files in package build directories SYNOPSIS
dh_fixperms [debhelperoptions] [-Xitem] DESCRIPTION
dh_fixperms is a debhelper program that is responsible for setting the permissions of files and directories in package build directories to a sane state -- a state that complies with Debian policy. dh_fixperms makes all files in usr/share/doc in the package build directory (excluding files in the examples/ directory) be mode 644. It also changes the permissions of all man pages to mode 644. It removes group and other write permission from all files. It removes execute permissions from any libraries, headers, Perl modules, or desktop files that have it set. It makes all files in the standard bin and sbin directories, usr/games/ and etc/init.d executable (since v4). Finally, it removes the setuid and setgid bits from all files in the package. When the Rules-Requires-Root field has the (effective) value of binary-targets, dh_fixperms will also reset the ownership of all paths to "root:root". OPTIONS
-Xitem, --exclude item Exclude files that contain item anywhere in their filename from having their permissions changed. You may use this option multiple times to build up a list of things to exclude. SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Joey Hess <joeyh@debian.org> 11.1.6ubuntu2 2018-05-10 DH_FIXPERMS(1)
All times are GMT -4. The time now is 04:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy