3

I mount my server drive through Nautilus as What is a program similar to WinSCP? describes, then how do I cd the directory in Terminal? I don't want to double click a folder again and again.

Rick
  • 180
  • OK - the errors you see come from permission restrictions. You mount as user tianhe but might not have proper access rights. Check the output of ls -l for the respective files. – FelixJN Jul 04 '19 at 10:42
  • @Fiximan I mount as ubuntu, the server account. The local terminal just shows my local id. – Rick Jul 04 '19 at 11:02
  • @pa4080 Hi there, would you like to take a look at this related question I asked just now? https://askubuntu.com/q/1155939/646012 – Rick Jul 04 '19 at 14:06

1 Answers1

5

Nautilus (and other file managers) have their mounts in /run

Try to search unter /run/user/<UID>/gvfs/<mount>/.

If you regularly need CLI commands, I'd suggest mounting from CLI, too.

FelixJN
  • 2,358
  • Yes, I just found it on /run/.. by right click "open at local terminal". But there's still a problem, I can't e.g. use sublime text to open the file directly. subl . doesn't work. Btw, what does mounting from CLI mean? The sshfs stuff? – Rick Jul 04 '19 at 10:31
  • CLI = command line interface. Yes, either sshfs or a cifs-mount, depending on the kind of network drive. I don't seem to fully understand your problem with opening a file. Could you elaborate some more? What errors do you see? – FelixJN Jul 04 '19 at 10:33
  • Oh, I see. I know what CLI means. I am just not familiar with sshfs, I will try later. With sshfs, I think maybe I will be able to open a remote file with my local editor e.g. sublime text subl index.html? – Rick Jul 04 '19 at 10:35
  • OK, let me upload a screenshot. – Rick Jul 04 '19 at 10:36
  • You already should be able open it with local editors when going via Nautilus and /run - assuming you do have the access rights on the network share. Permissions will be all the same between sshfs and a GUI Nautilus mount. sshfs will just mount is "like a local directory" and thus it'll behave as such. – FelixJN Jul 04 '19 at 10:39
  • Hmmm. My server username is ubuntu, local id is tianhe. When I connect to the server using Nautilus, I am required to input an server account. Then I used the "ubuntu" account. When I copy a file from local drive to server directory, the ownership automatically becomes "ubuntu". – Rick Jul 04 '19 at 10:41
  • And www-data often belongs to a www-user. You'll need to mount as some .... "higher authority", then, or give the user-ID you use for mounting group rights for the www-dir. – FelixJN Jul 04 '19 at 10:44