Benches macOS

3

FTP help!! Permission denied.

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I have a Mac Pro running the latest version of Mac OS X Server... I recently bought DreamWeaver CS3 and was having trouble connecting to my server from my laptop.

I heard PureFTPd was a good program to get the FTP up and running so I downloaded it, installed it, created an account using it, and it worked fine (i think) right after I installed it.

Now though, I can connect to the server through DreamWeaver and I can still see all my files and I can even open them, I just can't save them back to the server. It says "permission denied".

Was PureFTPd a good choice? Do I need it?

Also, if anyone had any basic FTP-setting-up-newbie guidelines that would be awesome!

thanks!

-Chris

3 replies

Sign in or join Beachball Help to reply.

  1. 0

    MrHoffman

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Apologies here, as I'm going straight on for terminal and for bash. ("Mind the gap," as it is so often said.)

    I'd going to use straight FTP here, at least for testing. Locally, sftp sees more use, as it is more secure, and as it effectively rides atop ssh access. (I mention this because most servers don't have FTP configured -- or don't have it enabled for general access -- and since you're looking to use FTP, do ensure it is enabled. This access can be implemented via Server Admin. Oh, and I'm assuming Apache is configured and started, too.)

    (If you're working remotely and/or from insecure networks, sftp can be a more secure approach. You might end up with root access to the server here to write into the web server directories, and you don't want that to be widely available. Also ensure Server Admin has the right hole poked through the Firewall here, allowing in ssh (and sftp) from remote sites, and probably allowing FTP only from local sites.)

    Ok; off into FTP.

    Open up Terminal.app for some testing. The following shows the ftp connection, the password, a remote directory listing command (ls), a command to change your directory (cd) an ASCII-mode transfer (I'm assuming HTML or CSS, which means ASCII-mode and not BIN binary-mode), get (fetch), a local directory command (lls) and a put (push) command. Assuming the default Apache, the cd may (will?) be to /library/webserver/documents/, or a subdirectory.

    +ftp [email protected]+

    password-for-login-user

    ls

    +cd whereever+

    +ascii (or bin)+

    +get file+

    lls

    +put some-other-file+

    What you are describing sounds like whatever login-user username you are specifying does not have write access to the target directory. This can be fixed on the server with chmod or by adding an ACL onto the target directory and/or onto the target file.

    If you can log in on the server directly -- or remotely; a typical remote-access command for this would be ssh [email protected] -- you can cd to the target directory and try to pico filename one of the files you are trying to modify. The cd you would want to get to is whereever you are looking to write your HTML files. Probably somewhere underneath /library/webserver/documents.

    FWIW, pico is one of the editors found on Mac OS X and Mac OS X Server, and fairly easy to figure out if you haven't used it before; I'm not going to suggest vi or emacs here at least until you're ready for that step.

    I'm guessing that if you check the protections on the target directory, your login-user probably can't write to the files. (Most web server directories and files are set to be owned by some user other than the web server, and most of the files accessed by the web server deliberately cannot be written by the web server. This for security.)

    If this is the case, there are various ways in. You can modify file-level access via chmod command, or you can modify your group (via workgroup manager) to allow you into the directory.

    The group "HTTP users" is www, and this is the group that can read most files. Root tends to be the user that can write to the area, though this might not be the case on your server -- or you can add or switch to a user that can write to the FTP directory area underneath the web server. Some folks load files as Root, and some set up an ACL that allows a specific set of users to have write access into the web server directories.

    I'm throwing a whole lot at you here; please ask if you're not sure of something. This isn't quite a cookbook, and I'm not sure how familiar you are with bash and FTP here.

  2. 0

    ciigma

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thank you very much for the lengthy reply!

    The directory I am having trouble accessing is, in fact, the Library/WebServer/documents directory...

    The user I was using to log in was a user I set up in PureFTPd. I'm not sure how to set the permissions for that user :/ ... Maybe I set up a virtual user (a user account strictly for accessing FTP right?)? I'm nots ure how DreamWeaver accesses the http://FTP... It simply asks me for the host (which I give the static IP address of the server), a "username" and a "password (which I give the account I set up in PureFTPd).

    I will try logging in using one of the admin accounts on the computer though. I'll look up some info on chmod too!

    Thank you again for the help! I think you're pushing me in the right direction!

    Oh, I had another question: Why use "passive FTP" for some situations??

  3. 0

    MrHoffman

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Mac OS X Server contains fully-functional FTP and sftp daemons, FWIW.

    I'm not familiar with PureFTPd and its "virtual users"; I use (regular or traditional or standard; whatever you want to call them) logins to get at the target environment via ftp. Or more usually, access via sftp.

    It would not surprise me to learn DreamWeaver included its own FTP client. AFAIK, it does.

    There is the more traditional or active ftp connection and a variant known as passive ftp, and depending on how the intervening network firewalls are set up, one or the other might make it through the firewalls involved. Neither active nor passive is a particularly good solution from a security perspective, and both are rather difficult to process securely, and depending on the network firewall configuration one or both can be blocked. At its simplest, if active fails. Try passive. If passive fails, then you're either being blocked entirely by one or more of the firewalls, or the network security folks are mandating sftp or IPsec or other such.

    My preference here is sftp. Tunneled ftp, if I'm stuck. sftp is secure against packet sniffing, and it uses the same port as ssh on the way through the firewall.