Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

share for non users (upload)

Got problems with your B2 or B3? Share and get helped!
Post Reply
Puma
Posts: 230
Joined: 29 Sep 2008, 06:30

share for non users (upload)

Post by Puma »

Hello,

does someone knows a simple way for non users to upload a file to a public folder without access to storage etc.?

With ftp or webinterface with an useraccount you can see storage etc.

How can for example my friend upload a file to my bubba (with internet acccess).

Puma
Linux is like a wigwam - no windows, no gates, apache inside!
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: share for non users (upload)

Post by RandomUsername »

You could create a new user and specify a different ftp home directory. For example, if you comment out the line in /etc/proftpd/proftpd.conf that says "DefaultRoot" I think a user will be automatically put into their own home directory. You will need to restart the ftp service (/etc/init.d/proftpd reload).
Gordon
Posts: 1470
Joined: 10 Aug 2011, 03:18

Re: share for non users (upload)

Post by Gordon »

I have DefaultRoot set to /home/ myself (the trailing slash is important). Every user that has a valid login can thus see every other users directories and enter them if they have sufficient rights.

I've created a new folder in /home named ftp which is where the anonymous users go to

Code: Select all

<Anonymous /home/ftp>
  <Limit LOGIN>
        AllowAll
  </Limit>
  User                          ftp
  Group                         nogroup
  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias                     anonymous ftp
  # Cosmetic changes, all files belongs to ftp user
  DirFakeUser   on ftp
  DirFakeGroup on ftp

  RequireValidShell             off

  # Limit the maximum number of anonymous logins
  MaxClients                    10

  # Allow write to the upload folder
  <Directory upload>
    <Limit STOR>
      AllowAll
    </Limit>
  </Directory>

  # Limit WRITE everywhere in the anonymous chroot
  <Directory *>
    <Limit WRITE>
      DenyAll
    </Limit>
  </Directory>
</Anonymous>
I think there are some other directives you can use on the upload folder, but I've added ACL's to that folder

Code: Select all

# file: upload
# owner: nobody
# group: users
user::rwx
group::rwx
group:users:rwx
mask::rwx
other::-wx
default:user::---
default:group::---
default:group:users:rwx
default:mask::rwx
default:other::---
So essentially this means anonymous users can write files in the upload folder but not read them back. How's that?
Post Reply