Permission problem running touch through ssh command (but not with ssh access)non root ssh keys helpWhy is my ssh connection unauthorized although I have updated my key on the remote machine?Webserver-User has no Shell-Access but needs SSH-Keys or Permission change of directory?How do I stop ssh-agent trying all keys with agent forwarding?SSH pageant not workingSSH Remote Execution - checking server can do it?Why is my SSH connection being closed immediately after pubkey auth succeeds?SSH Configuration Help / Can't tunnelAws ec2 - How to rsync files between two remotes?passwordless ssh to localhost in Ubuntu 16.04

What does "Puller Prush Person" mean?

Why Is Death Allowed In the Matrix?

Do I have a twin with permutated remainders?

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

The use of multiple foreign keys on same column in SQL Server

Why is consensus so controversial in Britain?

Why was the small council so happy for Tyrion to become the Master of Coin?

What are these boxed doors outside store fronts in New York?

When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?

Why not use SQL instead of GraphQL?

How much RAM could one put in a typical 80386 setup?

Adding span tags within wp_list_pages list items

How can I make my BBEG immortal short of making them a Lich or Vampire?

Replacing matching entries in one column of a file by another column from a different file

Pattern match does not work in bash script

Font hinting is lost in Chrome-like browsers (for some languages )

Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?

What's the point of deactivating Num Lock on login screens?

Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)

How does one intimidate enemies without having the capacity for violence?

How is it possible to have an ability score that is less than 3?

Today is the Center

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

Equivalence principle before Einstein



Permission problem running touch through ssh command (but not with ssh access)


non root ssh keys helpWhy is my ssh connection unauthorized although I have updated my key on the remote machine?Webserver-User has no Shell-Access but needs SSH-Keys or Permission change of directory?How do I stop ssh-agent trying all keys with agent forwarding?SSH pageant not workingSSH Remote Execution - checking server can do it?Why is my SSH connection being closed immediately after pubkey auth succeeds?SSH Configuration Help / Can't tunnelAws ec2 - How to rsync files between two remotes?passwordless ssh to localhost in Ubuntu 16.04






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I run a remote script through ssh and get permission errors on touch, while everything works fine if I connect through ssh using the same key. The script is executed, echoes are run for example.



Here is the code I run:



ssh -Tv user@149.202.xxx.xxx 'bash var/deploy.sh'


Here is the content of the script:



#!/bin/bash
echo "blabla"
touch bidule
ln -sfn www-26 www


Here is the result of the command:



debug1: Reading configuration data /Users/local_user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 149.202.xxx.xxx [149.202.xxx.xxx] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /Users/local_user/.ssh/id_rsa type -1
...
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.5p1 Ubuntu-10ubuntu0.1
debug1: match: OpenSSH_7.5p1 Ubuntu-10ubuntu0.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 149.202.xxx.xxx:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none
debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:sSTBN/oPCEhmpaK2UKIU1DC1uhlGB3F0II2TDfHi5eA
debug1: Host '149.202.xxx.xxx' is known and matches the ECDSA host key.
debug1: Found key in /Users/local_user/.ssh/known_hosts:1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/local_user/.ssh/local_user_mac
debug1: Server accepts key: pkalg ssh-rsa blen 535
debug1: Authentication succeeded (publickey).
Authenticated to 149.202.xxx.xxx ([149.202.xxx.xxx]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Sending environment.
debug1: Sending env LC_CTYPE = UTF-8
debug1: Sending command: bash var/deploy.sh
blabla
touch: cannot touch 'bidule': Permission denied
ln: failed to create symbolic link 'www': Permission denied
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 4144, received 2844 bytes, in 0.4 seconds
Bytes per second: sent 10803.0, received 7414.0
debug1: Exit status 1


I also tried various options with ssh (-ttv, -Tv, -v) and always get the same answer.



Note that if I use the same key and simply go with a
ssh user@149.202.xxx.xxx
and then run bash var/deploy.sh from the command line, it works fine.



Also note that all the content of this directory is uploaded via sftp using the same key.



Context:



Server os:



Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful


Client (where the ssh command is used): bitbucket pipeline instance or mac OSX for local tests.



For information here is the permissions on the var directory:



[10:39:32] iam.test.edu-sante.com@Dagobert:~/var$ ls -rtla
total 48
drwxr-xr-x 4 root root 4096 Mar 26 14:37 ..
-rw-r--r-- 1 user group 58 Mar 26 17:46 deploy.sh
drwxr-xr-x 3 user group 4096 Mar 26 17:46 www-26
...
lrwxrwxrwx 1 user group 6 Mar 27 10:13 www -> www-24
drwxr-xr-x 11 user group 4096 Mar 27 10:13 .


Note that the var directory here isn't the /var directory it's a $HOME/var directory specific to the user.



And just in case here is my sshd config file:



# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
UsePrivilegeSeparation yes
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 2m
PermitRootLogin no
StrictModes yes
MaxAuthTries 6
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
Match group sftp
ChrootDirectory %h
ForceCommand internal-sftp
AllowTcpForwarding no


User isn't part of the sftp group.










share|improve this question






























    0















    I run a remote script through ssh and get permission errors on touch, while everything works fine if I connect through ssh using the same key. The script is executed, echoes are run for example.



    Here is the code I run:



    ssh -Tv user@149.202.xxx.xxx 'bash var/deploy.sh'


    Here is the content of the script:



    #!/bin/bash
    echo "blabla"
    touch bidule
    ln -sfn www-26 www


    Here is the result of the command:



    debug1: Reading configuration data /Users/local_user/.ssh/config
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 21: Applying options for *
    debug1: Connecting to 149.202.xxx.xxx [149.202.xxx.xxx] port 22.
    debug1: Connection established.
    debug1: key_load_public: No such file or directory
    debug1: identity file /Users/local_user/.ssh/id_rsa type -1
    ...
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.9
    debug1: Remote protocol version 2.0, remote software version OpenSSH_7.5p1 Ubuntu-10ubuntu0.1
    debug1: match: OpenSSH_7.5p1 Ubuntu-10ubuntu0.1 pat OpenSSH* compat 0x04000000
    debug1: Authenticating to 149.202.xxx.xxx:22 as 'user'
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none
    debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug1: Server host key: ecdsa-sha2-nistp256 SHA256:sSTBN/oPCEhmpaK2UKIU1DC1uhlGB3F0II2TDfHi5eA
    debug1: Host '149.202.xxx.xxx' is known and matches the ECDSA host key.
    debug1: Found key in /Users/local_user/.ssh/known_hosts:1
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey
    debug1: Next authentication method: publickey
    debug1: Offering RSA public key: /Users/local_user/.ssh/local_user_mac
    debug1: Server accepts key: pkalg ssh-rsa blen 535
    debug1: Authentication succeeded (publickey).
    Authenticated to 149.202.xxx.xxx ([149.202.xxx.xxx]:22).
    debug1: channel 0: new [client-session]
    debug1: Requesting no-more-sessions@openssh.com
    debug1: Entering interactive session.
    debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
    debug1: Sending environment.
    debug1: Sending env LC_CTYPE = UTF-8
    debug1: Sending command: bash var/deploy.sh
    blabla
    touch: cannot touch 'bidule': Permission denied
    ln: failed to create symbolic link 'www': Permission denied
    debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
    debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
    debug1: channel 0: free: client-session, nchannels 1
    Transferred: sent 4144, received 2844 bytes, in 0.4 seconds
    Bytes per second: sent 10803.0, received 7414.0
    debug1: Exit status 1


    I also tried various options with ssh (-ttv, -Tv, -v) and always get the same answer.



    Note that if I use the same key and simply go with a
    ssh user@149.202.xxx.xxx
    and then run bash var/deploy.sh from the command line, it works fine.



    Also note that all the content of this directory is uploaded via sftp using the same key.



    Context:



    Server os:



    Distributor ID: Ubuntu
    Description: Ubuntu 17.10
    Release: 17.10
    Codename: artful


    Client (where the ssh command is used): bitbucket pipeline instance or mac OSX for local tests.



    For information here is the permissions on the var directory:



    [10:39:32] iam.test.edu-sante.com@Dagobert:~/var$ ls -rtla
    total 48
    drwxr-xr-x 4 root root 4096 Mar 26 14:37 ..
    -rw-r--r-- 1 user group 58 Mar 26 17:46 deploy.sh
    drwxr-xr-x 3 user group 4096 Mar 26 17:46 www-26
    ...
    lrwxrwxrwx 1 user group 6 Mar 27 10:13 www -> www-24
    drwxr-xr-x 11 user group 4096 Mar 27 10:13 .


    Note that the var directory here isn't the /var directory it's a $HOME/var directory specific to the user.



    And just in case here is my sshd config file:



    # $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
    Port 22
    Protocol 2
    HostKey /etc/ssh/ssh_host_rsa_key
    HostKey /etc/ssh/ssh_host_ecdsa_key
    HostKey /etc/ssh/ssh_host_ed25519_key
    UsePrivilegeSeparation yes
    SyslogFacility AUTH
    LogLevel INFO
    LoginGraceTime 2m
    PermitRootLogin no
    StrictModes yes
    MaxAuthTries 6
    RSAAuthentication yes
    PubkeyAuthentication yes
    AuthorizedKeysFile %h/.ssh/authorized_keys
    IgnoreRhosts yes
    RhostsRSAAuthentication no
    HostbasedAuthentication no
    PasswordAuthentication no
    PermitEmptyPasswords no
    ChallengeResponseAuthentication no
    UsePAM yes
    X11Forwarding yes
    PrintMotd no
    AcceptEnv LANG LC_*
    Subsystem sftp /usr/lib/openssh/sftp-server
    Match group sftp
    ChrootDirectory %h
    ForceCommand internal-sftp
    AllowTcpForwarding no


    User isn't part of the sftp group.










    share|improve this question


























      0












      0








      0








      I run a remote script through ssh and get permission errors on touch, while everything works fine if I connect through ssh using the same key. The script is executed, echoes are run for example.



      Here is the code I run:



      ssh -Tv user@149.202.xxx.xxx 'bash var/deploy.sh'


      Here is the content of the script:



      #!/bin/bash
      echo "blabla"
      touch bidule
      ln -sfn www-26 www


      Here is the result of the command:



      debug1: Reading configuration data /Users/local_user/.ssh/config
      debug1: Reading configuration data /etc/ssh/ssh_config
      debug1: /etc/ssh/ssh_config line 21: Applying options for *
      debug1: Connecting to 149.202.xxx.xxx [149.202.xxx.xxx] port 22.
      debug1: Connection established.
      debug1: key_load_public: No such file or directory
      debug1: identity file /Users/local_user/.ssh/id_rsa type -1
      ...
      debug1: Enabling compatibility mode for protocol 2.0
      debug1: Local version string SSH-2.0-OpenSSH_6.9
      debug1: Remote protocol version 2.0, remote software version OpenSSH_7.5p1 Ubuntu-10ubuntu0.1
      debug1: match: OpenSSH_7.5p1 Ubuntu-10ubuntu0.1 pat OpenSSH* compat 0x04000000
      debug1: Authenticating to 149.202.xxx.xxx:22 as 'user'
      debug1: SSH2_MSG_KEXINIT sent
      debug1: SSH2_MSG_KEXINIT received
      debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none
      debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none
      debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
      debug1: Server host key: ecdsa-sha2-nistp256 SHA256:sSTBN/oPCEhmpaK2UKIU1DC1uhlGB3F0II2TDfHi5eA
      debug1: Host '149.202.xxx.xxx' is known and matches the ECDSA host key.
      debug1: Found key in /Users/local_user/.ssh/known_hosts:1
      debug1: SSH2_MSG_NEWKEYS sent
      debug1: expecting SSH2_MSG_NEWKEYS
      debug1: SSH2_MSG_NEWKEYS received
      debug1: SSH2_MSG_SERVICE_REQUEST sent
      debug1: SSH2_MSG_SERVICE_ACCEPT received
      debug1: Authentications that can continue: publickey
      debug1: Next authentication method: publickey
      debug1: Offering RSA public key: /Users/local_user/.ssh/local_user_mac
      debug1: Server accepts key: pkalg ssh-rsa blen 535
      debug1: Authentication succeeded (publickey).
      Authenticated to 149.202.xxx.xxx ([149.202.xxx.xxx]:22).
      debug1: channel 0: new [client-session]
      debug1: Requesting no-more-sessions@openssh.com
      debug1: Entering interactive session.
      debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
      debug1: Sending environment.
      debug1: Sending env LC_CTYPE = UTF-8
      debug1: Sending command: bash var/deploy.sh
      blabla
      touch: cannot touch 'bidule': Permission denied
      ln: failed to create symbolic link 'www': Permission denied
      debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
      debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
      debug1: channel 0: free: client-session, nchannels 1
      Transferred: sent 4144, received 2844 bytes, in 0.4 seconds
      Bytes per second: sent 10803.0, received 7414.0
      debug1: Exit status 1


      I also tried various options with ssh (-ttv, -Tv, -v) and always get the same answer.



      Note that if I use the same key and simply go with a
      ssh user@149.202.xxx.xxx
      and then run bash var/deploy.sh from the command line, it works fine.



      Also note that all the content of this directory is uploaded via sftp using the same key.



      Context:



      Server os:



      Distributor ID: Ubuntu
      Description: Ubuntu 17.10
      Release: 17.10
      Codename: artful


      Client (where the ssh command is used): bitbucket pipeline instance or mac OSX for local tests.



      For information here is the permissions on the var directory:



      [10:39:32] iam.test.edu-sante.com@Dagobert:~/var$ ls -rtla
      total 48
      drwxr-xr-x 4 root root 4096 Mar 26 14:37 ..
      -rw-r--r-- 1 user group 58 Mar 26 17:46 deploy.sh
      drwxr-xr-x 3 user group 4096 Mar 26 17:46 www-26
      ...
      lrwxrwxrwx 1 user group 6 Mar 27 10:13 www -> www-24
      drwxr-xr-x 11 user group 4096 Mar 27 10:13 .


      Note that the var directory here isn't the /var directory it's a $HOME/var directory specific to the user.



      And just in case here is my sshd config file:



      # $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
      Port 22
      Protocol 2
      HostKey /etc/ssh/ssh_host_rsa_key
      HostKey /etc/ssh/ssh_host_ecdsa_key
      HostKey /etc/ssh/ssh_host_ed25519_key
      UsePrivilegeSeparation yes
      SyslogFacility AUTH
      LogLevel INFO
      LoginGraceTime 2m
      PermitRootLogin no
      StrictModes yes
      MaxAuthTries 6
      RSAAuthentication yes
      PubkeyAuthentication yes
      AuthorizedKeysFile %h/.ssh/authorized_keys
      IgnoreRhosts yes
      RhostsRSAAuthentication no
      HostbasedAuthentication no
      PasswordAuthentication no
      PermitEmptyPasswords no
      ChallengeResponseAuthentication no
      UsePAM yes
      X11Forwarding yes
      PrintMotd no
      AcceptEnv LANG LC_*
      Subsystem sftp /usr/lib/openssh/sftp-server
      Match group sftp
      ChrootDirectory %h
      ForceCommand internal-sftp
      AllowTcpForwarding no


      User isn't part of the sftp group.










      share|improve this question
















      I run a remote script through ssh and get permission errors on touch, while everything works fine if I connect through ssh using the same key. The script is executed, echoes are run for example.



      Here is the code I run:



      ssh -Tv user@149.202.xxx.xxx 'bash var/deploy.sh'


      Here is the content of the script:



      #!/bin/bash
      echo "blabla"
      touch bidule
      ln -sfn www-26 www


      Here is the result of the command:



      debug1: Reading configuration data /Users/local_user/.ssh/config
      debug1: Reading configuration data /etc/ssh/ssh_config
      debug1: /etc/ssh/ssh_config line 21: Applying options for *
      debug1: Connecting to 149.202.xxx.xxx [149.202.xxx.xxx] port 22.
      debug1: Connection established.
      debug1: key_load_public: No such file or directory
      debug1: identity file /Users/local_user/.ssh/id_rsa type -1
      ...
      debug1: Enabling compatibility mode for protocol 2.0
      debug1: Local version string SSH-2.0-OpenSSH_6.9
      debug1: Remote protocol version 2.0, remote software version OpenSSH_7.5p1 Ubuntu-10ubuntu0.1
      debug1: match: OpenSSH_7.5p1 Ubuntu-10ubuntu0.1 pat OpenSSH* compat 0x04000000
      debug1: Authenticating to 149.202.xxx.xxx:22 as 'user'
      debug1: SSH2_MSG_KEXINIT sent
      debug1: SSH2_MSG_KEXINIT received
      debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none
      debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none
      debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
      debug1: Server host key: ecdsa-sha2-nistp256 SHA256:sSTBN/oPCEhmpaK2UKIU1DC1uhlGB3F0II2TDfHi5eA
      debug1: Host '149.202.xxx.xxx' is known and matches the ECDSA host key.
      debug1: Found key in /Users/local_user/.ssh/known_hosts:1
      debug1: SSH2_MSG_NEWKEYS sent
      debug1: expecting SSH2_MSG_NEWKEYS
      debug1: SSH2_MSG_NEWKEYS received
      debug1: SSH2_MSG_SERVICE_REQUEST sent
      debug1: SSH2_MSG_SERVICE_ACCEPT received
      debug1: Authentications that can continue: publickey
      debug1: Next authentication method: publickey
      debug1: Offering RSA public key: /Users/local_user/.ssh/local_user_mac
      debug1: Server accepts key: pkalg ssh-rsa blen 535
      debug1: Authentication succeeded (publickey).
      Authenticated to 149.202.xxx.xxx ([149.202.xxx.xxx]:22).
      debug1: channel 0: new [client-session]
      debug1: Requesting no-more-sessions@openssh.com
      debug1: Entering interactive session.
      debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
      debug1: Sending environment.
      debug1: Sending env LC_CTYPE = UTF-8
      debug1: Sending command: bash var/deploy.sh
      blabla
      touch: cannot touch 'bidule': Permission denied
      ln: failed to create symbolic link 'www': Permission denied
      debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
      debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
      debug1: channel 0: free: client-session, nchannels 1
      Transferred: sent 4144, received 2844 bytes, in 0.4 seconds
      Bytes per second: sent 10803.0, received 7414.0
      debug1: Exit status 1


      I also tried various options with ssh (-ttv, -Tv, -v) and always get the same answer.



      Note that if I use the same key and simply go with a
      ssh user@149.202.xxx.xxx
      and then run bash var/deploy.sh from the command line, it works fine.



      Also note that all the content of this directory is uploaded via sftp using the same key.



      Context:



      Server os:



      Distributor ID: Ubuntu
      Description: Ubuntu 17.10
      Release: 17.10
      Codename: artful


      Client (where the ssh command is used): bitbucket pipeline instance or mac OSX for local tests.



      For information here is the permissions on the var directory:



      [10:39:32] iam.test.edu-sante.com@Dagobert:~/var$ ls -rtla
      total 48
      drwxr-xr-x 4 root root 4096 Mar 26 14:37 ..
      -rw-r--r-- 1 user group 58 Mar 26 17:46 deploy.sh
      drwxr-xr-x 3 user group 4096 Mar 26 17:46 www-26
      ...
      lrwxrwxrwx 1 user group 6 Mar 27 10:13 www -> www-24
      drwxr-xr-x 11 user group 4096 Mar 27 10:13 .


      Note that the var directory here isn't the /var directory it's a $HOME/var directory specific to the user.



      And just in case here is my sshd config file:



      # $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
      Port 22
      Protocol 2
      HostKey /etc/ssh/ssh_host_rsa_key
      HostKey /etc/ssh/ssh_host_ecdsa_key
      HostKey /etc/ssh/ssh_host_ed25519_key
      UsePrivilegeSeparation yes
      SyslogFacility AUTH
      LogLevel INFO
      LoginGraceTime 2m
      PermitRootLogin no
      StrictModes yes
      MaxAuthTries 6
      RSAAuthentication yes
      PubkeyAuthentication yes
      AuthorizedKeysFile %h/.ssh/authorized_keys
      IgnoreRhosts yes
      RhostsRSAAuthentication no
      HostbasedAuthentication no
      PasswordAuthentication no
      PermitEmptyPasswords no
      ChallengeResponseAuthentication no
      UsePAM yes
      X11Forwarding yes
      PrintMotd no
      AcceptEnv LANG LC_*
      Subsystem sftp /usr/lib/openssh/sftp-server
      Match group sftp
      ChrootDirectory %h
      ForceCommand internal-sftp
      AllowTcpForwarding no


      User isn't part of the sftp group.







      ubuntu ssh






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 0:48









      Rui F Ribeiro

      41.9k1483142




      41.9k1483142










      asked Mar 27 at 11:20









      Jean-Xavier RaynaudJean-Xavier Raynaud

      31




      31




















          1 Answer
          1






          active

          oldest

          votes


















          1














          It seems you want to run the script in the ~/var directory, but currently it is run in the home directory.



          The command bash var/deploy.sh does not switch to the var directory, and touch bidule tries to create a file in the current directory, which is likely the user's home directory.






          share|improve this answer























          • One solution would be to cd to the correct directory before calling the script, another one would be to let the script do the cd (which I personally would have done).

            – Kusalananda
            Mar 27 at 11:45











          • Hi sorry for the stupid question and thanks for the answer. I wasn't able to upvote you as I don't have the needed reputation, but I would have otherwise

            – Jean-Xavier Raynaud
            Mar 28 at 12:21











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508952%2fpermission-problem-running-touch-through-ssh-command-but-not-with-ssh-access%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          It seems you want to run the script in the ~/var directory, but currently it is run in the home directory.



          The command bash var/deploy.sh does not switch to the var directory, and touch bidule tries to create a file in the current directory, which is likely the user's home directory.






          share|improve this answer























          • One solution would be to cd to the correct directory before calling the script, another one would be to let the script do the cd (which I personally would have done).

            – Kusalananda
            Mar 27 at 11:45











          • Hi sorry for the stupid question and thanks for the answer. I wasn't able to upvote you as I don't have the needed reputation, but I would have otherwise

            – Jean-Xavier Raynaud
            Mar 28 at 12:21















          1














          It seems you want to run the script in the ~/var directory, but currently it is run in the home directory.



          The command bash var/deploy.sh does not switch to the var directory, and touch bidule tries to create a file in the current directory, which is likely the user's home directory.






          share|improve this answer























          • One solution would be to cd to the correct directory before calling the script, another one would be to let the script do the cd (which I personally would have done).

            – Kusalananda
            Mar 27 at 11:45











          • Hi sorry for the stupid question and thanks for the answer. I wasn't able to upvote you as I don't have the needed reputation, but I would have otherwise

            – Jean-Xavier Raynaud
            Mar 28 at 12:21













          1












          1








          1







          It seems you want to run the script in the ~/var directory, but currently it is run in the home directory.



          The command bash var/deploy.sh does not switch to the var directory, and touch bidule tries to create a file in the current directory, which is likely the user's home directory.






          share|improve this answer













          It seems you want to run the script in the ~/var directory, but currently it is run in the home directory.



          The command bash var/deploy.sh does not switch to the var directory, and touch bidule tries to create a file in the current directory, which is likely the user's home directory.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 27 at 11:25









          SjoerdSjoerd

          32328




          32328












          • One solution would be to cd to the correct directory before calling the script, another one would be to let the script do the cd (which I personally would have done).

            – Kusalananda
            Mar 27 at 11:45











          • Hi sorry for the stupid question and thanks for the answer. I wasn't able to upvote you as I don't have the needed reputation, but I would have otherwise

            – Jean-Xavier Raynaud
            Mar 28 at 12:21

















          • One solution would be to cd to the correct directory before calling the script, another one would be to let the script do the cd (which I personally would have done).

            – Kusalananda
            Mar 27 at 11:45











          • Hi sorry for the stupid question and thanks for the answer. I wasn't able to upvote you as I don't have the needed reputation, but I would have otherwise

            – Jean-Xavier Raynaud
            Mar 28 at 12:21
















          One solution would be to cd to the correct directory before calling the script, another one would be to let the script do the cd (which I personally would have done).

          – Kusalananda
          Mar 27 at 11:45





          One solution would be to cd to the correct directory before calling the script, another one would be to let the script do the cd (which I personally would have done).

          – Kusalananda
          Mar 27 at 11:45













          Hi sorry for the stupid question and thanks for the answer. I wasn't able to upvote you as I don't have the needed reputation, but I would have otherwise

          – Jean-Xavier Raynaud
          Mar 28 at 12:21





          Hi sorry for the stupid question and thanks for the answer. I wasn't able to upvote you as I don't have the needed reputation, but I would have otherwise

          – Jean-Xavier Raynaud
          Mar 28 at 12:21

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508952%2fpermission-problem-running-touch-through-ssh-command-but-not-with-ssh-access%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          -ssh, ubuntu

          Popular posts from this blog

          Mobil Contents History Mobil brands Former Mobil brands Lukoil transaction Mobil UK Mobil Australia Mobil New Zealand Mobil Greece Mobil in Japan Mobil in Canada Mobil Egypt See also References External links Navigation menuwww.mobil.com"Mobil Corporation"the original"Our Houston campus""Business & Finance: Socony-Vacuum Corp.""Popular Mechanics""Lubrite Technologies""Exxon Mobil campus 'clearly happening'""Toledo Blade - Google News Archive Search""The Lion and the Moose - How 2 Executives Pulled off the Biggest Merger Ever""ExxonMobil Press Release""Lubricants""Archived copy"the original"Mobil 1™ and Mobil Super™ motor oil and synthetic motor oil - Mobil™ Motor Oils""Mobil Delvac""Mobil Industrial website""The State of Competition in Gasoline Marketing: The Effects of Refiner Operations at Retail""Mobil Travel Guide to become Forbes Travel Guide""Hotel Rankings: Forbes Merges with Mobil"the original"Jamieson oil industry history""Mobil news""Caltex pumps for control""Watchdog blocks Caltex bid""Exxon Mobil sells service station network""Mobil Oil New Zealand Limited is New Zealand's oldest oil company, with predecessor companies having first established a presence in the country in 1896""ExxonMobil subsidiaries have a business history in New Zealand stretching back more than 120 years. We are involved in petroleum refining and distribution and the marketing of fuels, lubricants and chemical products""Archived copy"the original"Exxon Mobil to Sell Its Japanese Arm for $3.9 Billion""Gas station merger will end Esso and Mobil's long run in Japan""Esso moves to affiliate itself with PC Optimum, no longer Aeroplan, in loyalty point switch""Mobil brand of gas stations to launch in Canada after deal for 213 Loblaws-owned locations""Mobil Nears Completion of Rebranding 200 Loblaw Gas Stations""Learn about ExxonMobil's operations in Egypt""Petrol and Diesel Service Stations in Egypt - Mobil"Official websiteExxon Mobil corporate websiteMobil Industrial official websiteeeeeeeeDA04275022275790-40000 0001 0860 5061n82045453134887257134887257

          Frič See also Navigation menuinternal link

          Identify plant with long narrow paired leaves and reddish stems Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?What is this plant with long sharp leaves? Is it a weed?What is this 3ft high, stalky plant, with mid sized narrow leaves?What is this young shrub with opposite ovate, crenate leaves and reddish stems?What is this plant with large broad serrated leaves?Identify this upright branching weed with long leaves and reddish stemsPlease help me identify this bulbous plant with long, broad leaves and white flowersWhat is this small annual with narrow gray/green leaves and rust colored daisy-type flowers?What is this chilli plant?Does anyone know what type of chilli plant this is?Help identify this plant