FTP Directories

Advanced feature discussion, beta programs and unsupported "Labs" features.
6 posts Page 1 of 1
by nhdesign » Thu Apr 01, 2021 7:10 am
Good morning,

I have been using the FTP feature's of Sonic for years. I create
directories, use them, and then have my crontab delete them after 2 days.
I created and still own this directory, but whether from the command line
or my crontab, I cannot rmdir. I also cannot write or delete files from
the directories.

sh.sonic.net:nhdesign:/home2/02/32/nhdesign 53 % ls -la /nfs/ftp/pub/incoming/22jdid94nnaajd/
total 8
drwx----wx. 1 nhdesign user 4096 Mar 18 07:25 .
drwx-wx-wx. 1 root user 4096 Mar 14 05:37 ..

sh.sonic.net:nhdesign:/home2/02/32/nhdesign 121 % rmdir /nfs/ftp/pub/incoming/22jdid94nnaajd
rmdir: failed to remove '/nfs/ftp/pub/incoming/22jdid94nnaajd': Directory not empty
by scott » Thu Apr 01, 2021 3:04 pm
nhdesign wrote:
Good morning,

I have been using the FTP feature's of Sonic for years. I create
directories, use them, and then have my crontab delete them after 2 days.
I created and still own this directory, but whether from the command line
or my crontab, I cannot rmdir. I also cannot write or delete files from
the directories.

sh.sonic.net:nhdesign:/home2/02/32/nhdesign 53 % ls -la /nfs/ftp/pub/incoming/22jdid94nnaajd/
total 8
drwx----wx. 1 nhdesign user 4096 Mar 18 07:25 .
drwx-wx-wx. 1 root user 4096 Mar 14 05:37 ..

sh.sonic.net:nhdesign:/home2/02/32/nhdesign 121 % rmdir /nfs/ftp/pub/incoming/22jdid94nnaajd
rmdir: failed to remove '/nfs/ftp/pub/incoming/22jdid94nnaajd': Directory not empty


I'm not sure why that stopped working. It is definitely on the todo list of things to figure out, especially since I'm curious why the existing perms stopped working, and I'm considering using something other than sshfs or nfs to get shares to the shell server.

I went and looked, and I think I've identified what's wrong. Will let you know when we have a fix in place, and now I'm really curious -- because if this isn't the problem, I'll have to investigate more.

(Has to do with nfs permissions on sftp server that serves the sshfs...this very same problem would be happening if we were using nfs, it is an nfs problem I may be seeing.)

Edit: I can create an incoming ftp directory in your own ftp directory that will work as you describe, would that be a good solution?
by nhdesign » Fri Apr 02, 2021 3:29 am
Good morning,
I do not have an immediate need. I can wait until after it is sorted out.
Thanks,
by scott » Fri Apr 02, 2021 11:36 am
nhdesign wrote:
Good morning,
I do not have an immediate need. I can wait until after it is sorted out.
Thanks,

Try it now! Just tested the fix: I su'ed to you, went in the incoming directory (which I couldn't list), then I made a directory in there, and escaped out the back end with incoming/my_very_own_hidden_directory . (Paraphrased.)

Mad props to @William for wrangling with the filer. The order of the NFS export rules had to be re-arranged. He really knows his stuff -- all our SOC guys do.

-Scott
by nhdesign » Fri Apr 02, 2021 11:51 am
Looks good.
I am able to chmod r and w
I am able to write files to them and delete them.
I rmdir'd one of them successfully.
I will let my crontab rmdir the other tonight.

Thanks,
by scott » Fri Apr 02, 2021 12:15 pm
nhdesign wrote:
Looks good.
I am able to chmod r and w
I am able to write files to them and delete them.
I rmdir'd one of them successfully.
I will let my crontab rmdir the other tonight.

Thanks,

Excellent. BTW, I will be changing the permissions so that anonymous ftp can't create directories in incoming, those days are gone, heh
6 posts Page 1 of 1

Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 guests (based on users active over the past 5 minutes)
Most users ever online was 964 on Tue Sep 29, 2020 11:23 pm

Users browsing this forum: No registered users and 9 guests