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
post(3FORM)															       post(3FORM)

NAME
post - write or erase forms from associated subwindows SYNOPSIS
#include <form.h> int post_form(FORM *form); int unpost_form(FORM *form); DESCRIPTION
The function post_form displays a form to its associated subwindow. To trigger physical display of the subwindow, use refresh or some equivalent curses routine (the implicit doupdate triggered by an curses input request will do). The function unpost_form erases form from its associated subwindow. RETURN VALUE
These routines return one of the following: E_OK The routine succeeded. E_BAD_ARGUMENT Routine detected an incorrect or out-of-range argument. E_BAD_STATE Routine was called from an initialization or termination function. E_NOT_POSTED The form has not been posted. E_NOT_CONNECTED No items are connected to the form. E_NO_ROOM Form is too large for its window. E_POSTED The form has already been posted. E_SYSTEM_ERROR System error occurred (see errno). SEE ALSO
ncurses(3NCURSES), form(3FORM). NOTES
The header file <form.h> automatically includes the header file <curses.h>. PORTABILITY
These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions. AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. post(3FORM)
All times are GMT -4. The time now is 03:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy