Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I am a newbie to SELinux feature. I am facing a very common problem with vsFTP home folder setup. I need to setup a home folder for an anonymous ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    4

    vsFTP upload to root folder problem


    Hi, I am a newbie to SELinux feature.

    I am facing a very common problem with vsFTP home folder setup. I need to setup a home folder for an anonymous FTP user with 777 permissions, so that an anonymous FTP user can upload or donwload files into his home folder. But SELinux will not allow that, becoz of security reasons. I cannot make a subfolder under it for uploads, becoz on solaris, 777 permissions on anonymous FTP root is allowed. So, when I port my product to Enterprise Linux, I need to keep the folder structure intact. Can someone please help me as to what are the steps to disable SELinux for vsFTP so that I can overcome this problem. Or please suggest me any good workaround, so that an anonymous user can upload onto the root folder itself.

    Thanks a lot! in advance.
    Edit/Delete Message

  2. #2
    Just Joined!
    Join Date
    Oct 2008
    Location
    Cochin
    Posts
    12
    1. You can either set SELINUX to permissive mode

    #setenforce 0

    2. Set the proper selinux context for the FTP directory. Since it is anonymous upload it should be 'system_u:object_rublic_content_t'

    # chcon -R -t public_content_t /directory

    Reference : Red Hat Knowledgebase: How do I set a different home folder for anonymous ftp in Red Hat Enterprise Linux 5?

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    4
    Thanks for ur response,

    I disabled SELinux by setting /selinux/enforce to '0'. Restarted vsFTP service. But still facing the same problem. Now, another doubt sprouts in my mind. Is it an SELinux restriction or a vsFTP restriction. If its the later, then what can be done. Please help!

  4. #4
    Just Joined!
    Join Date
    Mar 2009
    Posts
    4
    Just to add, my problem is that I want to keep the 777 permissions on the root foler in tact. At this point, I don't bother even about he security issue. I just have to make it work as it works with normal FTP. I guess, vsFTP should provide some relaxation in customizing the security to the admin's need. I looked at 'man vsftpd' and the reference link u sent. But could not make out the solution I need.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •