hfornazier
(Humberto Fornazier)
February 8, 2020, 5:24pm
1
Hello,
Would it be possible in the configuration file to only inform a specific folder? avoiding access to the entire cloud?
example:
[remote]
client_id =
client_secret =
token = {"access_token": "XXX", "token_type": "bearer", "expiry": "0001-01-01T00: 00: 00Z"}
folder = / Doctos
Thanks!
I think this is the "root_folder_id = " in your config file. Look what your browser shows you on that specific folder. example if you have a folder called Doctos and you go in that folder in your browser you see that in the address bar: https://drive.google.com/drive/u/0/folders/blablabla000000blablabla
so your root_folder_id = blablabla000000blablabla
so you mount on your gdrive that folder not the root folder.
hfornazier
(Humberto Fornazier)
February 8, 2020, 7:22pm
3
Pal_Toth:
root_folder_id
Thanks for the answer.
I'm sorry I didn't inform you before, in my case I use PCloud, but this option doesn't seem to be available.
hfornazier
(Humberto Fornazier)
February 8, 2020, 8:09pm
4
I wanted this option for ICloud and OneDrive. I believe that for OneDrive you don't have that option either!
Just make an alias remote for it:
https://rclone.org/alias/
hfornazier
(Humberto Fornazier)
February 8, 2020, 10:22pm
6
Thanks again.
This parameter is interesting, but the main source needs to be exposed in rclone.config to work.
This way, another user will be able to access the entire cloud.
On the PC where I run my backups, another user can open the configuration file and access all folders using the main source.
[pcloudClients]
type = pcloud
token = {"access_token":"XXX","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}
[client01]
type = alias
remote = pcloudClients:/CLIENT01
Thanks!
If the cloud provider doesn't support it, not sure what rclone would do.
If the rclone.conf had a folder defined, the user can just configure another one without it and have access since the user needs to be able to read the rclone.conf file.
Can you share a folder with said user and just point to that?
https://www.pcloud.com/help/ios-help-center/how-can-i-share-folders-with-others
Not sure as I have never used pCloud but that would work fine with Google Drive.
hfornazier
(Humberto Fornazier)
February 8, 2020, 10:53pm
8
Animosity022, His idea was great ...
I did the following:
I created a free trial account. I shared the folder I want with this new account and created a configuration for Rclone.
The Shared folder is displayed in the test account, so I think it is possible to read and write to it.
If it works it will be an option.
I'm going to do more tests this weekend.
If all goes well, I post here to help other users with the same need.
Thanks Again!
hfornazier
(Humberto Fornazier)
February 9, 2020, 4:23pm
9
Another detail, for developers ..
On PCloud, RClone has / root access and it is possible to start from a folder.
Each folder (has an ID, a sequence of numbers), where the root is 0 (zero).
I believe that if this sequence is entered in rclone.config it could be started from it, or even using the initial name of a specific folder.
Thanks!
ncw
(Nick Craig-Wood)
February 10, 2020, 9:08am
10
You are right I think... Fancy working up a pull request for that?
hfornazier
(Humberto Fornazier)
February 10, 2020, 11:55am
11
Yes absolutely yes,
what do you need? where should i post? I did a little test in php using the PCloud API, see an image.
That would be incredible for my need! Thank you!
ncw
(Nick Craig-Wood)
February 10, 2020, 5:02pm
12
What you need to do is make this
"github.com/rclone/rclone/lib/rest"
"golang.org/x/oauth2"
)
const (
rcloneClientID = "DnONSzyJXpm"
rcloneEncryptedClientSecret = "ej1OIF39VOQQ0PXaSdK9ztkLw3tdLNscW2157TKNQdQKkICR4uU7aFg4eFM"
minSleep = 10 * time.Millisecond
maxSleep = 2 * time.Second
decayConstant = 2 // bigger for slower decay, exponential
rootID = "d0" // ID of root folder is always this
rootURL = "https://api.pcloud.com"
)
// Globals
var (
// Description of how to auth for this app
oauthConfig = &oauth2.Config{
Scopes: nil,
Endpoint: oauth2.Endpoint{
AuthURL: "https://my.pcloud.com/oauth2/authorize",
into a config variable.
That should be reasonably straight forward....
hfornazier
(Humberto Fornazier)
February 10, 2020, 5:34pm
13
Excuse me, but I don't understand ... you say put "rootID" in my rclone.config?
I had already tried it, but it didn't work.
Thanks!
Rclone Version: v1.51.0
[pcloudtest]
type = pcloud
token = {"access_token":"xxxxx","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}
rootID = "d3602202600"
[pcloudtest]
type = pcloud
token = {"access_token":"xxxxx","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}
rootID = "3602202600"
ncw
(Nick Craig-Wood)
February 11, 2020, 11:37am
14
It needs some code changes. I was wondering if you wanted to work on them?
hfornazier
(Humberto Fornazier)
February 11, 2020, 12:19pm
15
I would like it very much, but my knowledge of the language is very limited ... Would there be any possibility of putting this functionality in a future version of RClone?
This week I will resume my studies in GO. I believe that in some time I can contribute more to this wonderful project!
Thanks!
ncw
(Nick Craig-Wood)
February 11, 2020, 2:22pm
16
Can you please make a new issue on github about this. I'll write instructions on what needs to be done then you or someone else can have a go at implementing it
1 Like
hfornazier
(Humberto Fornazier)
February 11, 2020, 4:40pm
17
Ok ... today I'm going to create a post to request this resource, with more details.
Today I also created a GO environment to continue analyzing how I can help with this task.
Thank you one more time!
hfornazier
(Humberto Fornazier)
February 11, 2020, 5:02pm
18
ncw:
rootID
I already created the post ... I'm following it!
Thanks!
opened 05:00PM - 11 Feb 20 UTC
What is your current rclone version (output from rclone version)?
v1.51.0
What problem are you are trying to solve?
To define a variable in...
1 Like
hfornazier
(Humberto Fornazier)
February 12, 2020, 2:50pm
19
Am I getting this message when compiling, any suggestions?
Thanks!
build github.com/rclone/rclone: cannot load archive/zip: malformed module path "
archive/zip": missing dot in first path element
ncw
(Nick Craig-Wood)
February 12, 2020, 8:54pm
20
Not sure! Can you describe what you did while building?