Forums

[resolved] Using SHH in terminal to unrestrict temporary files (30 posts)

  1. mmcmahon
    Member
    Posted 1 year ago #

    I have been trying to release the restriction of uploading temporary files via wordpress by my server. My host is not exactly the most user friendly team of individuals. I have received these two comments from them:

    LEt me explain what is behind the scene
    >
    > 1. As I wrote
    > Plesk to secure your webfiles assigned permissions to only your
    > username and psacln group, which prevents hackers to get access
    > over the Apache to your files
    > 2. WordPress requires that Apache user to be given that access
    > so you need to set it manually using command I wrote
    > 3. Plesk to ensure your webfiles security is resetting permissions each day
    > so before uploading you need to perform that command and after that
    > upload yourthemes

    I have upgraded with SSH and logged into terminal, and I received this email when I asked for help:

    You need to use
    Applications/Utilities/Terminal

    once there
    type
    cd /httpdocs/path/to/folder/wordpress/temp
    path/to/folder/wordpress/temp is path to folder - you need to ask WordPress

    So I am asking you at wordpress...as this coded message seems to indicate...what is the file that I should be entereing after I log into terminal?

    Any help or advice would be GREATLY appreciated. I've spent days trying to get this to work...

    Thanks
    Melissa

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Where did you install WordPress on your server?

  3. mmcmahon
    Member
    Posted 1 year ago #

    httpdocs

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Is it in a folder called 'wordpress'?

  5. mmcmahon
    Member
    Posted 1 year ago #

    no, Its the guts directly into httpdocs

  6. mmcmahon
    Member
    Posted 1 year ago #

    when I tried to drag over the "wordpress" folder itself, it wouldn't go. I can try again, but then will I have to do the whole install process again?

  7. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try typing:
    cd /httpdocs/wp-content

  8. mmcmahon
    Member
    Posted 1 year ago #

    Ok. I'm away from my machine at the moment. I tried cd/httpdocs/wp-content/themes earlier and that didn't work. I'll try this tonight. thanks Esmi.

  9. mmcmahon
    Member
    Posted 1 year ago #

    This is the error msg I get.

    Last login: Fri Sep 17 18:29:03 on console
    melissa-mcmahons-macbook-pro:~ melissa$ cd /httpdocs/wp-content
    -bash: cd: /httpdocs/wp-content: No such file or directory

  10. mmcmahon
    Member
    Posted 1 year ago #

    I took a picture of my filepath, but not sure how to upload it here?

  11. mmcmahon
    Member
    Posted 1 year ago #

    ok. This is making a bit more sense....i just got this reply from my host:

    folder_name is which one is used for upload to server,
    please ask Worpress, because it depends of version you are using
    let us say they will tell you it is wordpress/temp
    then command will be
    chown -R apache:psacln httpdocs/wordpress/temp

    so, I assume it is in the theme and plugin folders. i'll see if this command works for those two, but what about my images? photographs. where does that upload to? I have the latest version of wordpress.

  12. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    There in no temp folder in WordPress...

  13. mmcmahon
    Member
    Posted 1 year ago #

    that's what he is saying I think. He is asking what folder within wordpress is holding the files that I am unable to automate via wordpress. Eg...themese must go in themes and plugins in plugins...where do pictures go?

  14. mmcmahon
    Member
    Posted 1 year ago #

    he just used "temp" as an example. That's what I'm saying. Communicating with this guy is like trying to write my own code!!

  15. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Images & attachments are uploaded to the wp-content/uploads folder.

  16. ClaytonJames
    Member
    Posted 1 year ago #

    I have been trying to release the restriction of uploading temporary files via wordpress by my server

    What is the exact error message you initially received? Exactly what event (what were you trying to do) prompted you to action?

  17. mmcmahon
    Member
    Posted 1 year ago #

    Esmi:

    I don't have an uploads folder under wp-content. Can I just make one? I actually tried to do this manually and pull my images over manually, but no such luck. Thoughts?

    ClaytonJames: I have been told that my host is restricting temporary files from being uploaded via the automated wordpress software. I have managed to manually install themes by just dragging them over to the themes folder. I have not been successful doing that with plugins or pictures. the error I get when I try to upload via the wordpress software for pictures is: Error saving media attachment.
    I'm not too worried about themes at the moment as I have my theme uploaded, but I will need to figure out plugins.

    My server told me that I needed to get SSH and login to terminal and ask wordpress where the folders are being stores through the automated software. They wrote back saying:

    folder_name is which one is used for upload to server,
    please ask Worpress, because it depends of version you are using
    let us say they will tell you it is wordpress/temp
    then command will be
    chown -R apache:psacln httpdocs/wordpress/temp

    he is using wordpress/temp as an example of where I would put it if it was called "temp". So, what I am trying to figure out is what folder does the automated software use to store the files so that I can give terminal the correct command to automate. Alternately I'm trying to figure out how to do everything manually and I'm not getting very far in either scenario! thanks for trying to help. Any input is greatly appreciated.

    m

  18. ClaytonJames
    Member
    Posted 1 year ago #

    I don't have an uploads folder under wp-content. Can I just make one?

    I'm not sure that you really need ssh to do this, but I'm already sure that you need a hew host. Try this first, then attack any remaining issues as a separate problem:

    You should be able to simply use your ftp client or the file manager in your hosts control panel to change permissions on the "wp-content" directory temporarily to 0777. Then see if WordPress will create the uploads folder for your media storage when you upload an image. If successful, change the permissions on wp-content back to 755 after the uploads directory is created.

  19. mmcmahon
    Member
    Posted 1 year ago #

    Thanks. This might be a really stupid quesion, but I can't find where to change the permissions from my control panel, or in FTP. I just see folders, but no permissions options. What would I be looking for if I was going through the FTP client for example....

  20. mmcmahon
    Member
    Posted 1 year ago #

    ClaytonJames...

    right, tell me about my host. I've been trying to get this up for almost a week now and I'm lucky to get a message back, and if I do it's generally cryptic!
    I can see the permissions under "info" in both the FTP and SSH client, but I can't alter them....there isn't an edit option.

    "open in editor" doesn't seem to be an option.

  21. ClaytonJames
    Member
    Posted 1 year ago #

    Short stroke: What are you using for an ftp client?

    Long stroke: in a terminal, log into your server via ssh, navigate to your httpdocs directory and...

    chmod 0777 wp-content

  22. mmcmahon
    Member
    Posted 1 year ago #

    sorry about this. Thanks very much for trying to help.

    Short stroke, I'm using cyberduck
    long stroke, I've tried logging onto my server but it's not making sense. This is what my host just sent me:

    You need to connect to server first
    e.g
    ssh username@server.ip.address
    where server.ip.address is IP in your welcome email
    after that invoke command

    Ok...that is fine and dandy, but again he has been pretty vague...I wish I could flog this guy with a dead fish.

    so my command looks like this but it doesn't work:

    ssh mmcmahon@server.66.199.162.10.address

    what should I replace "server" and "address" with?

  23. James
    Happiness Engineer
    Posted 1 year ago #

    When in Cyberduck, click the /wp-content/ directory and either click the "Get Info" button in the toolbar or go to File/Info in the menus. From there, select the Permissions pane and enter 777 for the permissions. More info:

    http://trac.cyberduck.ch/wiki/help/en/howto/info#UNIXPermissionsFTPSFTP

  24. ClaytonJames
    Member
    Posted 1 year ago #

    You are on the right track. I hope something here helps:

    Changing permissions using Cyberduck

    Using a terminal, you are also on the right track. You must first login using the server address they gave you.

    ]$ ssh username@www.yourserver.com

    or

    ]$ ssh username@ipaddress

    Then you can execute commands on your server, but FTP makes things so much easier. And by the way...

    A) I admire your tenacity, and...

    B) OS X, in my opinion, thanks to its UNIX underpinnings, is one of the most versatile and powerful operating systems available today. Don't shy away from the command line utilities.

    -Pogue Press and O'Reilly offer some great publications (just my opinion) on OS X Leopard and how to get to the real power that lays beneath the apple GUI.

  25. mmcmahon
    Member
    Posted 1 year ago #

    Thats brilliant. This is what happened however...

    Permission denied (SSH_FX_PERMISSION_DENIED: The user does not have sufficient permissions to perform the operation.)

  26. James
    Happiness Engineer
    Posted 1 year ago #

    It means the files are not owned by you and you won't be able to change them via SSH either. You'll have to ask your hosting provider to CHOWN the files to your user account.

  27. ClaytonJames
    Member
    Posted 1 year ago #

    If I may respond in the text messaging vernacular of my adolescent niece...

    OMG!! WTH??

    :-)

    Time for new hosting services.

  28. mmcmahon
    Member
    Posted 1 year ago #

    so, the tech guy at webserve went into my SSH and did it himeself (still not sure how) and this is what he sent back to me:

    Hello

    Please see listing

    drwxr-xr-x 4 apache psacln 4096 Sep 18 13:16 wp-content
    and also all inside is the same permissions

    As you can see wp-content is writable by apache

    May be there are additional instructions from WordPress team,?
    Could you please ask them?

    So could I be missing some information?

    Thanks
    Melissa

  29. ClaytonJames
    Member
    Posted 1 year ago #

    Bottom line... and this is just my opinion mind you... if you are using a host that gives you a web space where the files don't even belong to your user account, get the hell out of there. End it now, ask them for a refund, tell them please and thank you, but you just don't need their services anymore.

    All files should be owned by your user account on your web server, and should be writable by your username. Any file that needs write access from WordPress should be group-owned by the user account used by the webserver

  30. mmcmahon
    Member
    Posted 1 year ago #

    Thanks ClaytonJames. I agree. The fact that I've wasted DAYS just trying to get them to a. answer and email and B. answer the actual question that I asked....well, they have proven to be completely useless.

    Thanks for everyone's help. I'll get a new host and go from there...
    Thanks!
    m

Topic Closed

This topic has been closed to new replies.

About this Topic