FTP Guest User

Discussion in 'Hosting Services / Control Panel' started by Kattack, Feb 2, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am trying to create a FTP guest account where I can put things as administrator and then have guests come to download the files only. I have created a new account under the user manger and given the user "allow" permissions but when I ftp in as that user I can't see any files. Where are these user;s home directories? I read something about "remote initial directory" in the KB but I don't understand how to set that.

    Help.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    what FTP client are you using?


    different FTP clients have different way to configure remote directory. In general, you need to switch directory to /[yourusername]/directory


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. I am using filezilla to connect. I just don't understand theserver side. Whena user connets via FTP, which directory do they end up in as their home directory? How do I find that directory as the FTP administrator?

    -T
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    If you login with an additional user, you end up in the FTP root directory (\).

    If you login w/ your primary user, you end up in your website root (\[username]).

    Yes.. it is confusing, but unfortunately, this is how MS FTP works

    To get to a specified directory, you'll need to change directory to \[username]\[directory you created]

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  5. OK, I think I understand but when I log in with my primary user, I am unable to get to (or see) the home directory for the new user. From the new account I can find web site directories but I can't find the new user directory from the primary account.Where is the new user directory when I log into my primary account?
     
  6. Bruce

    Bruce DiscountASP.NET Staff

    The path should be the same


    \[username]\[directory you created]


    When you login w/ your primary user, IIS FTP server does something very funky, it automatically set the currect directory to \[username].


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  7. When I login with my primary account, it looks like this is true The PWD command says the current directory is "/primaryuser". However, I cannot change the directory to "/newuser". That directory doesn't exist. How do I get to my secondary ftp account directoryfrom my primary account?





    Also when I login under my secondary account, the PWD command says I am in the "/" directory, not the "/username" directory, like it does for the primary account. I can, howeever change the directory to "/primaryaccount" from the guest account. It seems to treat secondary accounts differently.





    Please advise.
     
  8. Bruce

    Bruce DiscountASP.NET Staff

    no no.. you misunderstood me


    your website root is always /[primaryuser] no matter which users you logged in as.


    Let say, you created a directory called publicunder your website root, you can access it by changing directory (CD) to /[primaryuser]/public




    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  9. Yes, I understand that. What I want to do is copy data to the secondary user's home ftp directory while I am logged in as the primary user. The quiestion is: How do I access the secondary user's home ftp directory while logged in as the primary user?
     
  10. By Default the main user has permissions to all the sub-directories under the root directory,so permission wont be an issue.







    Vikram

    DiscountASP.NET
    www.DiscountASP.NET

    Post Edited (vvsharma) : 2/6/2007 3:16:07 AM GMT
     
  11. Yes, I understand that. Please read the question. The problem I am having is that the secondary user's home directories don't seem to be accessible from the primary account. Where are they created? Is it even possible to access the secondary user's home directory while logged in as the primary user?
     
  12. Bruce

    Bruce DiscountASP.NET Staff

  13. I'm not sure what you want me to try. But the the attached log shows me loggin into my primary account then trying to set the working directory to /secondary user and failing. Then I log in as secondary user and CD to the web directory. This works. The problem I am having getting to the secondary ftp user's home directory when logged in as the primary user. Following is the log from Filezilla FTP program.





    Command:REST 0
    Response:350 Restarting at 0.
    Status:Disconnected from server
    Status:Connecting to ftp.topgunsailing.net ...
    Status:Connected with ftp.topgunsailing.net. Waiting for welcome message...
    Response:220-Microsoft FTP Service
    Response:220 DiscountASP.net FTP
    Command:USER topgunsaili
    Response:331 Password required for topgunsaili.
    Command:pASS *******
    Response:230-Welcome to Discountasp.net
    Response:230 User topgunsaili logged in.
    Command:SYST
    Response:215 Windows_NT
    Command:FEAT
    Response:211-FEAT
    Response: SIZE
    Response: MDTM
    Response:211 END
    Status:Connected
    Status:Retrieving directory listing...
    Command:pWD
    Response:257 "/topgunsaili" is current directory.
    Command:TYPE A
    Response:200 Type set to A.
    Command:pASV
    Response:227 Entering Passive Mode (216,177,91,84,10,242).
    Command:LIST -a
    Response:125 Data connection already open; Transfer starting.
    Response:226 Transfer complete.
    Status:Directory listing successful
    Command:TYPE I
    Response:200 Type set to I.
    Status:Retrieving directory listing...
    Command:CWD /kguest/
    Response:550 /kguest: The system cannot find the file specified.
    Error:Could not retrieve directory listing


    Command:pWD
    Response:257 "/topgunsaili" is current directory.
    Status:Disconnected from server
    Status:Connecting to ftp.topgunsailing.net ...
    Status:Connected with ftp.topgunsailing.net. Waiting for welcome message...
    Response:220-Microsoft FTP Service
    Response:220 DiscountASP.net FTP
    Command:USER kguest
    Response:331 Password required for kguest.
    Command:pASS *******
    Response:230-Welcome to Discountasp.net
    Response:230 User kguest logged in.
    Command:SYST
    Response:215 Windows_NT
    Command:FEAT
    Response:211-FEAT
    Response: SIZE
    Response: MDTM
    Response:211 END
    Status:Connected
    Status:Retrieving directory listing...
    Command:pWD
    Response:257 "/" is current directory.
    Command:TYPE A
    Response:200 Type set to A.
    Command:pASV
    Response:227 Entering Passive Mode (216,177,91,84,11,21).
    Command:LIST -a
    Response:125 Data connection already open; Transfer starting.
    Response:226 Transfer complete.
    Status:Directory listing successful
    Status:Retrieving directory listing...
    Command:CWD /topgunsaili/
    Response:250 CWD command successful.
    Command:pWD
    Response:257 "/topgunsaili" is current directory.
    Command:TYPE A
    Response:200 Type set to A.
    Command:pASV
    Response:227 Entering Passive Mode (216,177,91,84,11,22).
    Command:LIST -a
    Response:125 Data connection already open; Transfer starting.
    Response:226 Transfer complete.
    Status:Directory listing successful
     
  14. mjp

    mjp

    I've been playing with this on my account, and it's odd, issuing the CWD commands through an FTP client doesn't seem to work properly. Yet if you check the log, clicking the directory does a CWD, so I'm not sure what the difference is. Weird.


    Anyway - the additional FTP user does not have access to a home directory per se, only to your main user directory. IIS drops any additional user login into the server root rather than your main account root (which is why pwd returns "/"), which causes a lot of confusion where additional FTP users are concerned. Notice if you do a pwd when you log in to your main account the server returns "/topgunsaili".


    To accomplish what you want to do, you have to create a kguest directory, then in the permissions manager (https://my.discountasp.net/permission-manager.aspx) give the kguest user access to the kguest directory, but not the main account directory.


    Then set the initial directory in Filezilla to \topgunsaili\kguest and when you log in as kguest via FTP, you are sent to the \kguest directory, without access to any directories above.


    The only way I could get to the additional FTP user directory that I set up, using the additional FTP user login, was to set that initial directory in the FTP client.


    mjp
    DiscountASP.NET
    <SUB><SUP>http://DiscountASP.NET
     
  15. Thanks, we are making some progress. However, when I set the permissions for the secondary user to "Deny" for my topgunsaili directory, permissions mgr doesn't let me give access to any subdirectories. The only item in the list is "deny". Now what?
     
  16. Bruce

    Bruce DiscountASP.NET Staff

    Exactly..that's what's weird about IIS ftp server...

    If you use the primary user, it automatically map to /[primaryuser]

    if you use other user, pwd will show /

    by issueing a CD to /[username]/[directory you created], you should be able to use the same command no matter which user you used to login.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  17. The problem is that when logged in as the primary user, I cannot CD to /[secondaryusername], it doesn't exist. So how do I get files into the /secondaryuser directory when I'm logged in as the primary user??
     
  18. OK, that worked, thanks. Now on to the next problem. How do I make it so the anonymous login doesn't have permissions to the root directory. I tried the method that worked for secondary users but it doesn't work for the anonymous login. If the anonymous login permissions are set to allow/allow, then "none" does not show up in the combobox when I edit them. If I change the permissions to deny/deny then the next time I go to edit them the "none" shows up. However, when I select none I get the following error when I hit the update link


    Error: Permission Management is temporarily unavailable. Please try again in a few minutes. If this error persists, please contact support.


    I ran into a silimar problem with the secondary users but when I refreshed the page, it corrected itself. With the anonymous user, the permissions get set back to allow/allow.





    Is there another way to manage the ftp permissions? Can this be done from the command line?
     
  19. OK, I found another huge problem. I have my ftp anonymous login set to read only access via the permsiions manager. However, it appears I have full write access to my entire web site via my anonymous account. What can I do to secure my site?
     
  20. Anonymous FTP is disabled on DiscountASP servers. The anonymous user in the Permission Manager is really the IUSR user of your site. ASP/PHP applications run under this user. So you would generally need read and write permissions for the anonymous user in order for your application to be able to write to files and folders. It does not mean that anyone can FTP to your site.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  21. Bruce

    Bruce DiscountASP.NET Staff

    don't set it to deny, just do no add the additional users permission to the root.


    if there's no permission, the user cannot access the directory.


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page