Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Proftpd User Home Dir, this is a gimme!!
Chrisco
post Jun 15 2004, 10:29 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 15-June 04
Member No.: 3,160



heyas these forums are awesome, been reading since before i was brave enuff to get a box up.
Now i have a box up:) running debian (not sure what ver, just d/l last week).

ive done an apt-get install proftpd and it all is working fine so far.. just would like to know how i can change the default directory for ftp to be /var/www for uploading pages and so forth.

Im stupidly new to linux... also.. im not sure what sort of persmissions i should set for that dir... assuming that im the only one that will upload, and of course assuming that other ppl mite want to be malicious. smile.gif
any thoughts?
Go to the top of the page
 
+Quote Post
hughesjr
post Jun 15 2004, 04:25 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



How you can tell what distro of Debian you have is by looking in your /etc/apt/sources.list file ...

If it is pointing to a stable only, you are using Woody ...
If it is pointing to testing (maybe with stable for security updates only), you are using Sarge ...
If it is pointing to unstable, you are using SID ...

At the bottom of the file /etc/proftpd.conf (make sure you have all the anonymous stuff remarked out with a # right now) ... add this line:

DefaultRoot /var/www/ your_user

personally, I would make the owner of the /var/www directory my main user (in my case johnny) and the group www-data with this command:

chown -R johnny:www-data /var/www

I would make the permissions 775 on the www directory and 755 on all subdirectories under www ... except I would have any directories where the apache user (www-data) needs to write 775 as well.

I would make the permissions of most files (except ones that need to be written to by the webserver) 744 and the ones that ahve to be written to by the webserver at 774.


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
hughesjr
post Jun 15 2004, 04:42 PM
Post #3


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



I would put all other FTP users in a chroot jail ... I would create an FTP directory (I use /var/ftp) and an ftp group (ftp) ...

groupadd ftp

mkdir /var/ftp
chown -R root:ftp /var/ftp
chmod -R 775 /var/ftp


Now add this line after the DefaultRoot /var/www/ your_user line:

DefaultRoot /var/ftp

All users (except ones you call out above the DefaultRoot /var/ftp line) who login will be stuck in the /var/ftp directory ... if you want a user to be able to write in the /var/ftp directory, make them members of hte ftp group ... others can't all others write.

If you want to have other users who default into the another directory, add a line above the DefaultRoot /var/ftp line that is DefaultRoot /directory_path user


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Chrisco
post Jun 17 2004, 08:42 AM
Post #4


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 15-June 04
Member No.: 3,160



ahhh k... seems im running woody..

now i had already "chown"ed the /var/www although i didnt really know what i was doing.. what is the advantage of having the group there as well?

QUOTE
chown -R johnny:www-data /var/www


everything else seems str8 forward enough.... after being shown, that is tongue.gif
thanx heaps, that will me out alot.

------------------------
Chrisco
Go to the top of the page
 
+Quote Post
hughesjr
post Jun 17 2004, 09:16 AM
Post #5


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



Obviously you want to substitute your user for johnny.

The purpose for the group is that you can assign other users to be members of that group ... then they can change things in that directory...which could be good in the future. If you don't want anyone else to change the directory, you would not make them members of the www-data group.


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th December 2017 - 12:25 PM