Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11th January 2007, 10:15 AM
marisdembovskis's Avatar
marisdembovskis Offline
Registered User
 
Join Date: Mar 2006
Location: Gulbene - Latvia - Europe
Age: 30
Posts: 292
vsftpd how to upload file in /pub ?

Hi!
I have isntalled vsftpd and did that anoymous users can download files from pub. (var/ftp/pub)
But question is:
How to put those files in pub (as an administrator) not using terminal and ssh? Example: new files I have and I want to share them and put in pub. How I can make that if the only thing I have is ftp access?

As I understand i need to authorize for /pub
but now as it is anonymous, it doesnt ask for password!
It would be nice to acces pub anonymously without authorizing but in the same time to upload some files in /pub I would need to authorize.

thanks.
__________________
Jesus will back you UP!
Maris Dembovskis
Your life is the same as you.
---
my box=F 10 Toshiba R200 = nice & cool
was using ubuntu for a year, return to Fedora. :) Faster.
Reply With Quote
  #2  
Old 12th January 2007, 01:08 AM
stoggy Offline
Registered User
 
Join Date: Dec 2006
Location: Dallas, TX
Posts: 123
You need to enable local users to be able to log in by removing the comment symbol (#) before the local_enable instruction.
Reply With Quote
  #3  
Old 15th January 2007, 08:05 AM
marisdembovskis's Avatar
marisdembovskis Offline
Registered User
 
Join Date: Mar 2006
Location: Gulbene - Latvia - Europe
Age: 30
Posts: 292
I have enabled it!
but then I log into home for user foxy and I can not acces the pub direcotry to upload files there!

theres is no problem to upload files for foxy under /home/foxy via ftp, but problem comes up, when I want to upload /var/ftp/pub directory! And somehow I need to manage that directory too with FTP access and not only copying files in terminal to /var/ftp/pub!
__________________
Jesus will back you UP!
Maris Dembovskis
Your life is the same as you.
---
my box=F 10 Toshiba R200 = nice & cool
was using ubuntu for a year, return to Fedora. :) Faster.
Reply With Quote
  #4  
Old 4th February 2007, 11:56 PM
pbx's Avatar
pbx Offline
Registered User
 
Join Date: Dec 2005
Location: n00berland
Posts: 179
hey marisdembovskis:

you can not upload files to /var/ftp/pub is because you dont have write permissions on the directory (just make # ls -l in the ftp directory and you will see that the directory belongs to root!)
If you want to make the directory available to a specific user, as root make:
go to the ftp directory:
# cd /etc/ftp
change directory ownership to a specific user to the pub directory:
# chown user_name pub
# chgrp user_name pub

make shure that other users dont have write permitions in that directory ($ ls - l)

cheers
__________________
Using linux (FC) since Nov 2004 | Linux user # 435547 | smolt profile | do u know this?

Last edited by pbx; 5th February 2007 at 12:39 AM.
Reply With Quote
  #5  
Old 5th February 2007, 08:15 AM
marisdembovskis's Avatar
marisdembovskis Offline
Registered User
 
Join Date: Mar 2006
Location: Gulbene - Latvia - Europe
Age: 30
Posts: 292
ok.
I did, adduser m1
1. then manually vi /etc/passwd
2. replacet /home/m1 with /var/ftp/pub
m1:x:8013:8013::/var/ftp/pub:/bin/bash
3. chown m1 /var/ftp/, chgrop m1/var/ftp/


then I anonymous can view files, but when I try to connect to upload files,
It fails. "550 Failed to change directory." and again as user m1 I can not upload files. Why, dont know.

If I dont replace in /etc/passwd file that line /home/m1, then FTP opens it's home directory, but I neet /var/ftp/. so i changed it's home location to /var/ftp, but still nothing.

thanks for help, PBX.
__________________
Jesus will back you UP!
Maris Dembovskis
Your life is the same as you.
---
my box=F 10 Toshiba R200 = nice & cool
was using ubuntu for a year, return to Fedora. :) Faster.
Reply With Quote
  #6  
Old 6th February 2007, 07:02 AM
pbx's Avatar
pbx Offline
Registered User
 
Join Date: Dec 2005
Location: n00berland
Posts: 179
Note that if you make # chown m1 /var/ftp/ or # chgrp m1 /var/ftp/, then its the ftp directory that will change the owner, not the pub directory!

Please try: # chown m1 /var/ftp/pub && chgrp m1 /var/ftp/pub
or:# cd /var/ftp/ , then # chown m1 pub && chgrp m1 pub
(you can ignore "&&" and type chown and chgrp separately. "&&" just makes bash execute 1st command and then the the 2nd, if the first returned no errors... just a tip )

To check if the pub directory is owned by the user m1, just make # ls -l or # ll , in the directory above (/var/ftp) and you can see the owner of that directory on the 3th and 4th column.

I've just tested in my ftp server and it worked! I just had to change the directory ownership to the user I want.

If its still not working, then see if you have selinux disabled. (if enabled then disable it)

It needs to work!!
Regards

P.S. Don't forget to change back the ownership of /var/ftp to root!

EDIT: I forgot to tell you that you need to restart vsftpd when ever you make changes to /etc/vsftpd/vsftpd.conf. To restart, as root type: # service vsftpd restart
__________________
Using linux (FC) since Nov 2004 | Linux user # 435547 | smolt profile | do u know this?

Last edited by pbx; 6th February 2007 at 09:21 AM.
Reply With Quote
  #7  
Old 6th February 2007, 03:23 PM
marisdembovskis's Avatar
marisdembovskis Offline
Registered User
 
Join Date: Mar 2006
Location: Gulbene - Latvia - Europe
Age: 30
Posts: 292
However m1 is the owner of dir pub
[root@localhost ftp]# ls -al
total 24
drwxr-xr-x 3 root root 4096 Feb 5 10:43 .
drwxr-xr-x 23 root root 4096 Jan 23 19:06 ..
drwxr-xr-x 2 m1 m1 4096 Feb 5 12:14 pub

I can not write there in, when I try to do that with m1. (Im using FireFTP addon in firefox)
password is correct.
selinux works also fine (I can put files by other users in their /home/users direcotry. but this fails.

when I create directory or put file, it says:
550 Create directory operation failed.

well from ftp side seems everything fine, I guess that could be internet or firewall, because in terminal su m1, then I can create files. But Im not ready to disable selinux for FTP for 100%. I have checked all allow fot ftp, but none of disable...

thanks for help.
__________________
Jesus will back you UP!
Maris Dembovskis
Your life is the same as you.
---
my box=F 10 Toshiba R200 = nice & cool
was using ubuntu for a year, return to Fedora. :) Faster.
Reply With Quote
  #8  
Old 13th August 2007, 02:51 PM
marisdembovskis's Avatar
marisdembovskis Offline
Registered User
 
Join Date: Mar 2006
Location: Gulbene - Latvia - Europe
Age: 30
Posts: 292
SOLVED.

What i did:
1. added user, who will write in /var/ftp/
edited /etc/passwd and located his home to /var/ftp
2. in /var/ftp/pub/ made directory owned by new_user chown chgrp newuser
3. edit /etc/vsftpd/vsftpd.conf and added:

userlist_enable=YES
userlist_deny=NO
ftp_username=new_user

also attached my vsftpd and user_list

So now, anonymous can donwload, not upload.
but in the same directory /var/ftp/pub new-user can also upload files after he gives user and password and if they are correct.
Attached Files
File Type: txt user_list.txt (331 Bytes, 68 views)
File Type: conf vsftpd.conf (4.4 KB, 72 views)
__________________
Jesus will back you UP!
Maris Dembovskis
Your life is the same as you.
---
my box=F 10 Toshiba R200 = nice & cool
was using ubuntu for a year, return to Fedora. :) Faster.
Reply With Quote
Reply

Tags
file, or pub, upload, vsftpd

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vsftpd upload speed from different sub net is very low ArrowLee Servers & Networking 1 10th January 2008 05:50 AM
vsftpd not allowing anyone to upload fillthy Using Fedora 9 17th February 2006 06:35 PM
can't upload files vsftpd ashiers Servers & Networking 2 2nd November 2005 09:30 PM
vsftpd user cant upload. BrandonV Using Fedora 1 19th August 2005 07:29 AM


Current GMT-time: 12:32 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat