Anonymous FTP can't upload files

  • Hello
    Im using OpenMediaVault v1.6
    I was trying to create a FTP share that everybody can upload files to it.


    I enabled Anonymous FTP and gave the ACL to Other Read/Write /Execute to the folder.


    Now i can access this folder but i can't upload files to it.


    What can i do ?


    Thanks

  • First the anonymous login is mapped to user ftp not nobody.


    Second, ACL won't work if you don't have the module loaded http://www.proftpd.org/docs/modules/mod_facl.html I forgot but the module comes loaded already


    Third the default configuration for anonymous does not allow write in the shares, so not even loading the ACL module you will be allowed to write to the shares with anonymous login.


    Solution maybe (not tested): Create a guest account with no password that you can control/allow login with the privileges section. An account with no password has to be created in CLI not in the webUI. Make sure he has an uid higher than 1000 and belongs to users group
    This will not work

  • Is there an alternative ??
    What i want to do is:


    I've created a HTML and PHP code that uploads files to a certain directory.With ftp it looks simple (exept the part that it need write permission).
    Can i do this with windows share ?

  • Alternative is to modify source code of omv in the proftpd mkconf file to allow anonymous to write. This will change in every omv upgrade. You can use Windows share (samba) in guest mode only. That is password less but you need permission this time to user nobody either with acl or execute a chmod 777 in the folder.

  • At the directory /usr/share/openmediavault/mkconf/proftpd there are only this files :

    • mod_ban
    • mod_core
    • mod_tls
    • mod_wrap


    The line of the anonymous is found on the file proftpd.conf on /etc/proftpd .


    The line is
    <Anonymous ~ftp>
    User ftp
    Group nogroup
    UserAlias anonymous ftp
    DirFakeUser on ftp
    DirFakeGroup on ftp
    RequireValidShell off
    <Directory *>
    HideFiles (welcome.msg)
    HideNoAccess on
    <Limit WRITE>
    DenyAll "( ive changed this to AllowAll and uploaded the file to the server) But there is no change"
    </Limit>
    </Directory>
    </Anonymous>


    Am i doing something wrong ?

  • At the directory /usr/share/openmediavault/mkconf/proftpd
    ....
    Am i doing something wrong ?


    Yes. This path is wrong, you are one step too deep. /usr/share/openmediavault/mkconf is the right path and there you will find the proftpd config file for omv-mkconf proftpd.
    The anonymous block starts at line 169 and according to subzero's suggestion you should change the standard value Denyall at line 181 to AllowAll. After saving the file run omv-mkconf proftpd from the CLI and try again.
    If that doesn't work I can submit a version of how I managed it to allow uploads for anonymous users.

    Homebox: Bitfenix Prodigy Case, ASUS E45M1-I DELUXE ITX, 8GB RAM, 5x 4TB HGST Raid-5 Data, 1x 320GB 2,5" WD Bootdrive via eSATA from the backside
    Companybox 1: Standard Midi-Tower, Intel S3420 MoBo, Xeon 3450 CPU, 16GB RAM, 5x 2TB Seagate Data, 1x 80GB Samsung Bootdrive - testing for iSCSI to ESXi-Hosts
    Companybox 2: 19" Rackservercase 4HE, Intel S975XBX2 MoBo, C2D@2200MHz, 8GB RAM, HP P212 Raidcontroller, 4x 1TB WD Raid-0 Data, 80GB Samsung Bootdrive, Intel 1000Pro DualPort (Bonded in a VLAN) - Temp-NFS-storage for ESXi-Hosts

  • Thank you very both of you guys datadigger and subzero79.


    Quote

    But i need to restart the server to make it work.[quote='datadigger','http://forums.openmediavault.org/index.php/Thread/7048-Anonymous-FTP-can-t-upload-files/?postID=65036#post65036']run omv-mkconf proftpd from the CLI

    Running this didnt work

  • But i need to restart the server to make it work.


    Yes of course, sorry I forgot to mention.

    Homebox: Bitfenix Prodigy Case, ASUS E45M1-I DELUXE ITX, 8GB RAM, 5x 4TB HGST Raid-5 Data, 1x 320GB 2,5" WD Bootdrive via eSATA from the backside
    Companybox 1: Standard Midi-Tower, Intel S3420 MoBo, Xeon 3450 CPU, 16GB RAM, 5x 2TB Seagate Data, 1x 80GB Samsung Bootdrive - testing for iSCSI to ESXi-Hosts
    Companybox 2: 19" Rackservercase 4HE, Intel S975XBX2 MoBo, C2D@2200MHz, 8GB RAM, HP P212 Raidcontroller, 4x 1TB WD Raid-0 Data, 80GB Samsung Bootdrive, Intel 1000Pro DualPort (Bonded in a VLAN) - Temp-NFS-storage for ESXi-Hosts

  • nano +181 /usr/share/openmediavault/mkconf/proftpd should leave you just there.


    omv-mkconf proftpd rewrites the config at /etc/proftpd/proftpd.conf, then reload the daemon service and that's it.


    What I don't understand is why avoid just using a simple user with password to upload your files. You have to be aware that the user anonymous will still have no write access to the share if you change that. You need to open the folder to 777 mode or set in CLI the user ftp to have a primary group users


    The basic concept of privileges and permissions is explained in the guide in my signature.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!