LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-05-2024, 08:59 AM   #1
userarrayuser
LQ Newbie
 
Registered: Jan 2024
Posts: 12

Rep: Reputation: 0
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
 
Old 04-05-2024, 09:56 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,715

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
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?
 
Old 04-05-2024, 10:08 AM   #3
userarrayuser
LQ Newbie
 
Registered: Jan 2024
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
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.

Last edited by userarrayuser; 04-05-2024 at 10:10 AM.
 
Old 04-05-2024, 10:50 AM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,640

Rep: Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697
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.
 
Old 04-05-2024, 11:01 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,715

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
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.
 
  


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
Vsftpd ftp server doesn't see external ssd mounted directories ncpa_cpl Linux - Software 1 06-26-2018 10:09 AM
[SOLVED] sftp user unable to see mounted --bind directories. Works with vsftpd via ftp gmontie2003 Linux - Newbie 1 03-26-2015 08:11 PM
KVM Win XP guest can internet, can see smb on Slack 12.1 host "but can't find path" acummings Slackware 6 12-02-2008 01:16 AM
VSFTPD Can't See Filesystems Mounted in a chroot khopsicker Linux - Software 5 12-22-2005 12:12 PM
NFS: can't see the mounted drives of machine 1 on machine 2 b0nd Linux - Networking 4 12-21-2005 11:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:39 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