6

In Linux, pCloud is an appimage. When we run the application, it creates a mount point in /tmp

/tmp/.mount_pcloudjUJB13$ ls
app  AppRun  pcloud.desktop  pcloud.png  usr

And create some files and folders:

/home/user/.pcloud
/home/user/pCloudDrive
/home/user/.config/pcloud
/home/user/.config/autostart/pcloud.desktop
etc...

And it shows the content stored in the cloud in /home/user/pCloudDrive

~/pCloudDrive$ ls
My Music  My Pictures  My Videos

How can i run pcloud and change default mount point of pCloudDrive folder (to mount where I want) by command line?

6 Answers 6

2

I asked pCloud feedback Other Questions and got same day response #125269:

Thank you for reaching out to pCloud's Technical Support. Unfortunately, it's not possible to change that.

I also asked them Is it ok if I delete the mount point, the empty directory pCloudDrive, while pCloud is not running? Presumably pCloud will just re-create the mount point next time it starts? They responded:

We advise you to not delete the mount point.

3
  • 1
    I appreciate the pCloud service, and their support for Linux, and their price point, and I see now that they are being blogged around a bit more, so it's all good. Of course we're disappointed to have to tolerate these intrusions into our file management that don't fit our scheme, but I guess they may not be resourced to make these kind of customisations.
    – NeilG
    Commented Sep 18, 2018 at 23:20
  • 1
    This drawback stops me from using pcloud.
    – Student
    Commented Sep 25, 2019 at 1:27
  • @student, FYI, I believe there is now a way to mount pCloud drive at an arbitrary mount point of your own choosing. Q.v. my new answer: superuser.com/a/1761711/944540
    – NeilG
    Commented Jan 8, 2023 at 8:45
7

You don't need to create a new user as @jmbraben suggested: Changing the HOME variable is enough.

  1. First set up pcloud's "home" dir:
mkdir ~/.pcloud_home
cd ~/.pcloud_home
# Ensure pcloud sees the right ~/.config/autostart and ~/.local/share/applications
ln -s ~/.local
ln -s ~/.config
ln -s ~/.pcloud
  1. Start pcloud if you've never done so before to make it create its desktop file.
  2. Edit /.local/share/applications/appimagekit-pcloud.desktop and change the line
Exec="/path/to/pcloud" %U

to

Exec=env HOME="$HOME/.pcloud_home" "/path/to/pcloud" %U
  1. Create a symlink from wherever you want to ~/.pcloud_home/pCloudDrive.

If you start pcloud from the shell, make sure you start it as HOME=~/.pcloud_home pcloud. You can create a wrapper or an alias for that.

1
  • My goal is to make the cloud drive "read-only"...anything I want to be able to change I sync a folder. By using a different Linux user to log in, at least I can restrict it somewhat.
    – jmbraben
    Commented Jun 16, 2022 at 22:15
5

I'm not comfortable having the mount sitting in my home directory and also wish to move it. The best way I came up with was to create a user account on the system and log into pcloud via this user account.

This will create the pCloudDrive under

/home/pcloud_client/pCloudDrive

It appears that you must configure the pcloud service via the gui ui, but once configured, you can start it from the command line as that user (but it still needs some X access to start). So from my normal Ubuntu 18.04 account terminal login:

# allow X access to pcloud_client
xhost local:pcloud_client
su pcloud_client
/opt/pcloud &
exit

Unfortunately the mount in this client account is inaccessible from my normal account. From my normal account, this is the seen permissions. I tried a couple permission games, but nothing worked...and I really think unwise to get fancy with pCloud (and all my data):

drwxr-xr-x  4 pcloud pcloud 4096 Jun 11 14:15 .pcloud
d?????????  ? ?      ?         ?            ? pCloudDrive
drwxr-xr-x  2 pcloud pcloud 4096 Jun 11 12:58 Pictures

To remedy this, I created a shared mountpoint and mounted by bindfs:

mkdir /media/disk2/pcloud
sudo chown pcloud_client:pcloud_client /media/disk2/pcloud
sudo chmod g+w /media/disk2/pcloud
# add self to pcloud_client group
sudo usermod -a -G pcloud_client jmbraben
# use bindfs to share the mount from client account
# fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
su pcloud_client
bindfs -u jmbraben /home/pcloud_client/pCloudDrive/ /media/disk2/pcloud
exit

Doing this, I have read/write permissions via my normal account (as part of the "pcloud_client" group) at:

/media/disk2/pcloud 
1
  • I like your procedure (a bit twisted). I am going to try. thanks anyway
    – acgbox
    Commented Jun 11, 2019 at 20:01
3

Please refer to CLI version of pCloud client. It is a command-line program with no user interface. Mount point can be specified as a parameter for the daemon command.

0
2

In case you do not want to run the pcloud app neither, but only want to mount the drive, then rclone provides a good solution based on FUSE. Just run rclone config to configure the remote directory appropriately—let's call it "remote"—, create a target mount directory where you have write access as usual, say /mnt/remote, and then run

rclone mount remote: /mnt/remote

Note the above command will serve as FUSE client, so you may need to be demonize it somehow (there is a --daemon option). Unmouting is done with

fusermount -u /mnt/remote

See here for more details, options (and limitations).

1
  • Rclone is a cli program to manage files on cloud, a feature-rich alternative to vendors web interfaces, supported by over 40 cloud products. Rclone has powerful equivalents to rsync cp mv mount ls etc. Users call rclone "The Swiss army knife of cloud storage". Rclone preserves timestamps and verifies checksums. Transfers over limited bandwidth; intermittent connections, or subject to quota can be restarted. You can check file integrity. Rclone uses server-side transfers to minimise local bandwidth and transfers from one provider to another without using local disk: rclone.org
    – NeilG
    Commented Jan 8, 2023 at 9:01
1

Down the track since my previous answer, and I've discovered a(nother) way to set a mount point for pCloud using the GUI appImage. It's not too hard, seems to work, but it's not documented anywhere I can find so I specify some precautions.

I have not got any motivation to look into how to do this on Windoze. This is a Linux solution.

This solution is only for use within a single user account. Other answers to this question look at how to operate with other users.

Read through the whole solution before starting on it to understand the implications.

TLDR;

Add a setting in SQLite ~/.pcloud/data.db with the name fsroot and the value of the path you want to mount the erstwhile pCloudDrive onto. I suggest you make sure that directory exists as well ;-) e.g. /home/youruser/pcloud or whatever it is you want.

Disclaimer

This is working for me so far. Please take all precautions and monitor to ensure it's working in your case before you commit to it. I cannot guarantee any particular outcome.

Precautions

If you peruse the ~/.pcloud/data.db database you will notice some complexity and apparent tracking of files by iNode numbers (I think). Before making this change I suggest the following is carried out. Some of these measures (maybe even all of them) are probably unnecessary or duplicate precautions but I'm paranoid esp. when it comes to a sync app like pCloud:

  • backup all your data somewhere else first e.g. dump to an external SSD

  • make sure all syncing upload and download are all completed

  • using the GUI "Preferences" "Backup" and "Sync" tabs remove all backups and syncs that are set up

  • using GUI "Preferences" "Crypto" tab, lock the Crypto wallet if you have one

  • from GUI "Preferences" "Settings" tab under "Disk Usage" use the "Clear Cache" button

  • quit / exit the pCloud app

  • remove (or save at another location in case you want to roll back) the following directories:

    • ~/.pcloud
    • ~/.config/pcloud
    • ~/.config/autostart/pcloud
Incidentally

At this point I recommend starting pCloud again and just checking your files. I found some very strange behaviours, including the apparent restoration of files that I deleted / renamed a long time ago, almost as if pCloud had been caching the changes forever rather than implementing them properly. I suggest that perusing your files after removing the .pcloud etc could help you fix up your data and put pCloud in a more stable state. Potentially you may want to repeat all the precautions after this as well.

Change pCloud mount folder

pCloud defaults to mount the Fuse drive to pCloudDrive in your home directory. This is what's going to change. Make sure pCloud is not running.

Find the ~/.pcloud/data.db SQLite database and open it with your favourite SQL editor tool, presumably that will be Beekeeper Studio: https://www.beekeeperstudio.io/.

View the setting table in that database. It is simply just a list of key / value pairs (or in fact id / value pairs).

There is probably no fsroot in the id column. If there isn't you will need to add a row (just use the + in Beekeeper). If there's one already, half your luck, but presumably it's got the value /home/youruser/pCloudDrive, but I don't expect it to be there.

Update the new fsroot setting to the full path of the directory where you want pCloud to mount onto, for instance, /home/youruser/drive or whatever it is you want. Quit the database (you don't want it open when pCloud opens it).

Make sure the directory that you specified exists and is empty. There have been issues around this from time to time that may be solved but this is probably best. I would leave the /home/youruser/pCloudDrive directory around as well for now until you're sure it's all working.

Now pray and start pCloud. It should work.

Now you get to reconfigure all your pCloud sync and back-up settings all over again. You're welcome.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .