LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-10-2018, 01:14 PM   #1
gregfmartin
LQ Newbie
 
Registered: Apr 2018
Location: United States
Distribution: RHEL 7.5, CentOS 7
Posts: 4

Rep: Reputation: Disabled
vsftpd anonymous login w/ bind mount for local repo


Greetings all

My current objective is to setup a local repository server for internal use within our organization. I wanted to host on a CentOS 7 server using vsftpd. So far, I've been able to get anonymous logins to work, and so long as I store all of the packages in the default directory - /var/ftp/pub - everything works fine.

I've seen some information on the internet about using a bind mount in lieu of a symlink for when you want to store the packages in a different directory, and while I'm not too familiar with bind mounts in principle, I decided to give them a shot in practice to see what would happen. So I created a test directory /repos with permissions 444 and user/group is root:root; again, this is only a test so don't judge too harshly. After placing all of the packages in this directory, I ran createrepo and everything went swimmingly. Next I did a bind mount of /repos to /var/ftp and when I attempted to access the server with anonymous, I could do so but I couldn't see anything. I have to imagine this is a permissions issue, but I can't figure out what. SELinux is running, but I don't see anything odd with any of the booleans.

So not only do I have to ask what I'm doing wrong, but is it better to host a local repository server with HTTP(S) than FTP? First time doing this so I'm curious.

Thank you in advance.
 
Old 04-10-2018, 03:51 PM   #2
gregfmartin
LQ Newbie
 
Registered: Apr 2018
Location: United States
Distribution: RHEL 7.5, CentOS 7
Posts: 4

Original Poster
Rep: Reputation: Disabled
I apologise, but I was able to figure this out.

I'm unsure which one was the smoking gun, but I changed the permissions of the FTP root directory to 755 and changed the SELinux context to public_content_t and this seems to have resolved the matter.
 
Old 04-12-2018, 12:52 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by gregfmartin View Post
I apologise, but I was able to figure this out.

I'm unsure which one was the smoking gun, but I changed the permissions of the FTP root directory to 755 and changed the SELinux context to public_content_t and this seems to have resolved the matter.
Most likely it's the permissions.
If you want (sub)directories to be searchable using ftp (or http) protocl, you need to set the execute bit on (that is 755).

Regards
 
Old 04-13-2018, 08:34 AM   #4
gregfmartin
LQ Newbie
 
Registered: Apr 2018
Location: United States
Distribution: RHEL 7.5, CentOS 7
Posts: 4

Original Poster
Rep: Reputation: Disabled
For Future Reference

Taking my experience with setting this up, I've created a tutorial on my website that illustrates in detail how I accomplished this. Hopefully, people who see this post will find it helpful.

https://gregfmartin.com/2018/04/12/r...sitory-server/
 
  


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 anonymous login jhthjames Linux - Software 1 07-02-2013 10:02 AM
[SOLVED] 500 OOPS: vsftpd: refusing to run with writable anonymous root: Anonymous Login sanjay87 Linux - Server 5 08-14-2012 01:28 AM
vsftpd anonymous login r.stiltskin Linux - Networking 4 03-16-2007 11:19 PM
SUS9.3: can't do vsftpd anonymous login fisayo SUSE / openSUSE 1 11-16-2005 11:39 PM
vsftpd problems with anonymous login checta Linux - Networking 7 06-30-2004 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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