Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6230735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:48:21+00:00 2026-05-24T09:48:21+00:00

I am having trouble using rsh in the PHP exec() command. The error that

  • 0

I am having trouble using rsh in the PHP exec() command. The error that I’m getting is: Could not create directory '/nonexistent/.ssh'.

It appears that this is because Apache runs as the user nobody who does not have a home directory, therefore it cannot find/create a .ssh directory. What I would do from the terminal is something similar to:

sudo su - user_with_home_directory
/usr/bin/rsh -n -l username myserver.com /path/to/my/script.sh

But I am not aware of how to do this using PHP’s exec() command. I don’t want to (and cannot) give the nobody user a home directory just to get the problem to go away.

Any help is greatly appreciated to helping me figure out how to get this to work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:48:23+00:00Added an answer on May 24, 2026 at 9:48 am

    So it seems as if the rsh on the server that I’m using is Kerberos enabled, which in turn uses SSH to do the authentication. This is what was causing the search for a .ssh directory.

    To solve this, I created an SSH key and stored it on the filesystem at a different location other than the .ssh directory, again to prevent from creating a home directory for the nobody user. Then using SSH, I specified the -i option that points to my generated SSH key, allowing me to execute the script remotely without the need to login with a password.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble using python function decorators in Google's AppEngine. I'm not that familiar
I'm having trouble using PHP to SFTP upload files to a remote server. When
I'm having trouble using an argument from my class in one of that class's
I'm having trouble using prev() in jQuery where it's not selecting the right element.
I'm having trouble using Rhino Mocks to assert that a method was called (and
I'm having trouble using one Lua lib from inside another. I'm not sure about
Im having trouble using a .NET COM in vb6, It compiles ok and I
I am using mssql and am having trouble using a subquery. The real query
I am having trouble using the attribute XPath Selector in ElementTree, which I should
I'm having trouble using the flowlayoutPanel in a C# winform application. What I basically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.