Re: [Proftpd-user] proftpd-1.3.6c on centos8: When mod_quotatab_file is enable, the get command give "get: Access failed: 550 aa.sh: No such file or directory"

David Mathog <[email protected]>
Newsgroups gmane.network.proftpd.user
Message-ID <[email protected]>

On Sat, 9 May 2020, Dario Lesca wrote:

> I have install (via dnf) and configure proftpd-1.3.6c on centos 8.1 up
> to date without modify the basic configuration file and add my modules
> configuration file under include folder /etc/proftpd/conf.d/
>
> Then I have enable the mod_quotatab_file, configure it and initialize
> the Quota*Table file
>
>   QuotaLimitTable file:/etc/proftpd/ftpquota.limittab
>   QuotaTallyTable file:/etc/proftpd/ftpquota.tallytab
>
> All work fine except get command, when I try get a existent file uploaded, i obtain this error:
>
>   "get: Access failed: 550 aa.sh: No such file or directory"
>
> The aa.sh file exist and it have the right access, see this example
> session:
>
>   $ lftp -uftpste:mypass ftp://localhost -e 'site quota;ls aa.sh;lcd /tmp;get aa.sh;exit'
>   200-The current quota for this session are [current/limit]:
>   Name: ftpste
>   Quota Type: User
>   Per Session: False
>   Limit Type: Hard
>     Uploaded Mb:          0.69/5000.00
>     Downloaded Mb:        unlimited
>     Transferred Mb:       unlimited
>     Uploaded files:       unlimited
>     Downloaded files:     unlimited
>     Transferred files:    unlimited
>   200 Please contact root@localhost if these entries are inaccurate
>   -rw-r--r--   1 ftpste   gftpste        33 Dec  3 14:31 aa.sh
>   lcd ok, local cwd=/tmp
>   get: Access failed: 550 aa.sh: No such file or directory
>
> I have investigate with debug enable and "strace -p" during get
> sessionand I have realize that when this modules is enable (if it's
> disable get work fine), the  file is searched under / (/aa.sh) rather
> than into folder in which it is located: theuser's home in this case
>
> lstat("/aa.sh", 0x7ffe6dce9ed0) = -1 ENOENT (No such file or directory)
>
> If I create a empty file under / (touch /aa.sh) the get command work and the file obtained is the right file present into home folder.
>
> Is this a bug or there is some misconfiguration in my files?

1.  since it is CentOS (or any other RH derivative) make sure that selinux 
isn't the problem.  Turn that off and then retest.  In this case I doubt 
it is the issue, but it is so often, that it should always be tested.

2.  Verify that the configuration file syntax is correct.  This may be one 
of those instances where case matters and somewhere there may be a 
"${home}" which should be "${HOME}".  Since the former is not defined it 
is substituted with nothing, the rest of the path is added, and it ends up 
looking in the "/" directory rather than, for instance "/home/username".
At least in my experience that is the most common cause of any program 
looking in the root directory rather than the intended one.

Regards,

David Mathog


_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.