pcloudcom / console-client

440 stars 131 forks source link

Mount option/ chmod to remove read rights for other. #154

Open TiFaBl opened 2 years ago

TiFaBl commented 2 years ago

The client mounts the pCloudDrive with read permissions for other. However, for security reasons, in some case I would prefer to either run chmod o-rwx or set a 0770 mask when mounting - or any other approach to reach the result that only user and group can access the files. Is there an option to do that which I am missing?

TiFaBl commented 2 years ago

If i understand it correctly, the file and directory permissions are hardcoded in lib/pclsync/pfs.c. I changed the stbuf->st_mode=S_IFREG | 0644; to 0640 for files and stbuf->st_mode=S_IFDIR | 0755; to 0750 for directories. While this works and the mounted directory has the correct permissions, it feels very hacky and complicated to change source code and recompile the tool to be able to change the mode.