LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   FTP (vsftpd) can't see mounted SMB drives (https://www.linuxquestions.org/questions/linux-software-2/ftp-vsftpd-cant-see-mounted-smb-drives-4175735700/)

userarrayuser 04-05-2024 08:59 AM

FTP (vsftpd) can't see mounted SMB drives
 
Hello,

On Almalinux 8 if I mount a drive (from another server) and if a client connects to Almalinux via FTP (vsftpd) the mounted folder not visible in FTP client.
I checked the permissions and I tried with root user too.

This is how I mount the SMB drive:
//192.168.1.2/share-folder /root/remote-folder cifs username=remoteuser,password=12345678,iocharset=utf8,file_mode=0777,dir_mode=0777

What is missed?

Thank You

michaelk 04-05-2024 09:56 AM

Only root has permissions to access files within its home directory i.e. /root. root should never be able to login via ftp. If a directory is outside of the local_root directory you would need to use the cd command to change directories.

But it depends on how you configured vsftpd? Are you using chroot_local_users? How did you configure local_root?

userarrayuser 04-05-2024 10:08 AM

Quote:

Originally Posted by michaelk (Post 6494252)
Only root has permissions to access files within its home directory i.e. /root. root should never be able to login via ftp. If a directory is outside of the local_root directory you would need to use the cd command to change directories.

But it depends on how you configured vsftpd? Are you using chroot_local_users? How did you configure local_root?

I allowed root to use the FTP (because I thought I have a permission problem), but root can't see mounted folder too via FTP so if I login via ssh there are the test files and the mounted folder too in root's home and I can cd into it, if I login into server with root via FTP I can see only the test files, but not the mounted folder, and if I unmount the folder, I can see the mountpoint folder via FTP, if I remount the folder is goes away again.

wpeckham 04-05-2024 10:50 AM

I have seen that kind of thing work, but not using the software available today.
In general you cannot reshare a remote share with any success: if it ever works it will not be dependable.
Likewise, running a service on one box to provide access to data on another box is iffy. Can you not run an vsftp service on the box that actually owns that storage and data? THAT would work and be more dependable.

michaelk 04-05-2024 11:01 AM

Quote:

if I unmount the folder, I can see the mountpoint folder via FTP if is remount the folder is goes away again.
It does not happen me but it might depend on how vsftp configured? I don't see anything specific to a remote share in vsftp.conf. There is a deny_file, hide_files directives and chroot_jail but I have not tried anything to see if that would happen. Users should not be allowed to access /root anyway.


All times are GMT -5. The time now is 04:05 PM.