0

Problem:

When I save a php file to a development server over sshfs, the group is changed from apache to wheel. Given that the file belongs to my user and is readable by apache, this breaks the dev copy. I have to reset the group after every save.

Server file permissions:

As recommended by the Drupal community, my user owns the files but they are grouped to apache.

How I'm mapped:

I have a script that helps me do a local map to development servers running RHEL 7.1, change the folder in term, open a file browser, and start PHP Storm. I've set up the following convenience function for myself to do all this in one nice command.

$ sshmap devsvr

Which executes this function:

function sshmap {

  if [[ -z $2 ]]; then
    basefolder="/var/www/html/"
  else
    basefolder=$2
  fi

  fusermount -uz ~/mount/$1
  mkdir -p ~/mount/$1
  sshfs me@$1.domain.ext:$basefolder ~/mount/$1


  # file browser
  nemo  ~/mount/$1 &

  # change local folder to that mount point
  cd ~/mount/$1

  # start phpstorm
  pstorm $HOME/mount/$1 2>/dev/null &
}

Question:

How can I control this and prevent this change? Is there an argument in sshfs that I'm missing?

Errata: Safe write is turned on in PHPSTorm

enter image description here

Rick
  • 591
  • 1
  • 9
  • 23

0 Answers0