LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-18-2008, 08:16 AM   #1
noisebleed
Member
 
Registered: Feb 2007
Location: Porto, Portugal
Distribution: Gentoo
Posts: 41

Rep: Reputation: 15
Proftpd: UserOwner and GroupOwner not working (can't chown)


Hi.

I have proftpd 1.3.1_rc2-rc3 up and running with an anonymous user tech (alias of ftp) with password.

My objective is to have all files uploaded by tech chown to apache:apache because the ftp account will be used to host web pages (html , php).

This is /etc/proftpd/proftpd.conf:
Code:
ServerName              "NG-001"
ServerType              standalone
DefaultServer           on
RequireValidShell       off
AuthPAM                 on
AuthPAMConfig           ftp

UseReverseDNS off
IdentLookups off

Port                    21
PassivePorts            51000 51999

Umask                   022
MaxClients              20
MaxInstances            20
MaxLoginAttempts        3
RootLogin               off


Port                    21
PassivePorts            51000 51999

Umask                   022
MaxClients              20
MaxInstances            20
MaxLoginAttempts        3
RootLogin               off

ServerAdmin             support@noisebleed.pt

SystemLog               /var/log/proftpd.log
ServerLog               /var/log/proftpd.server.log
TransferLog             /var/log/proftpd.transfer.log

User                    ftp
Group                   ftp


DefaultRoot ~

<Directory />
        AllowOverwrite          on
</Directory>

<Anonymous /var/www/tech>
  User                  ftp
  Group                 ftp
  UserAlias             tech ftp
  AnonRequirePassword   on
  RequireValidShell     off
  MaxClients            10
  DisplayLogin          "message.txt"
  DisplayChdir          .message

  GroupOwner    apache
  UserOwner     apache


  <Limit LOGIN>
    AllowUser   ftp
    DenyAll
  </Limit>

  # Hide all files owned by user 'root'
  HideUser                      root

  <Limit READ WRITE DIRS STOR CWD CDUP>
    AllowUser   ftp
    DenyAll
  </Limit>

</Anonymous>
When running proftpd with
Code:
# proftpd -nd9
this is showned:
Code:
noisebleed.localnet (10.17.1.19[10.17.1.19]) - chown(/Logo_Noisebleed_Oficial.png) as root failed: Operation not permitted
I have proftpd compiled with:
Code:
USE="mysql ncurses nls opensslcrypt pam radius ssl tcpd -acl -authfile -clamav -hardened -ifsession -ipv6 -ldap -noauthunix -postgres -rewrite (-selinux) -shaper -sitemisc -softquota -vroot -xinetd"
Does anyone got the UserOwner directive working properly?

Last edited by noisebleed; 01-20-2008 at 07:58 AM.
 
Old 01-19-2008, 06:38 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
It may be easier to create the user tech and go that way or you may need something like;
Code:
<Anonymous ~ftp/sub/dir/>
  AnonRequirePassword on
  RequireValidShell off
  User ftp
  Group nobody

#  UserPassword ftp encpasswd
  UserPassword ftpuser1 encpasswd1
  UserPassword ftpuser2 encpasswd2
  (...)

  UserAlias ftpuser1 ftp
  UserAlias ftpuser2 ftp
  (...)
</Anonymous>
just a guess ...
 
Old 01-21-2008, 10:06 AM   #3
noisebleed
Member
 
Registered: Feb 2007
Location: Porto, Portugal
Distribution: Gentoo
Posts: 41

Original Poster
Rep: Reputation: 15
Hi. Thanks for helping.

The user tech is just an alias.

When I use the ftp user as username the same error ("chown(/Logo_Noisebleed_Oficial.png) as root failed: Operation not permitted") occurs. Don't know why.

Should I blame the mask?
Code:
Umask                   022

Last edited by noisebleed; 01-21-2008 at 10:15 AM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
proftpd chown as root failed john8675309 Linux - Software 2 12-06-2005 04:53 PM
proftpd - dynamic UserOwner, GroupOwner directives? mwo Linux - Software 1 11-24-2004 09:05 AM
chown not working for me? paulsh2k4 Linux - Software 3 10-04-2004 09:03 PM
GroupOwner in ProFTPd on 9.1 Mandrake AZDAVE Mandriva 0 03-10-2004 01:48 PM
proftpd --- need help? could someone post a working proftpd.conf i could look at ZooRoPa Linux - Networking 1 04-02-2003 06:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration