andresoviedo / google-drive-ftp-adapter Goto Github PK
View Code? Open in Web Editor NEWGoogle Drive FTP Adapter to connect to google drive through the FTP protocol
License: GNU Lesser General Public License v3.0
Google Drive FTP Adapter to connect to google drive through the FTP protocol
License: GNU Lesser General Public License v3.0
Hi,
I think that on your last commit you accidentally left wrong default credentials:
now is:
ftp.user=pep
ftp.pass=patata
according to documentation it should be:
ftp.user=user
ftp.pass=user
Everything is fine, it's just confusing for the new users that are testing your software
Great job by the way, keep it up
Apparently Google Drive handles some files differently. They appear to be created by google apps such as docs, slides, etc. If you download them via drive.google.com, google seems to decide on the fly to give them a format. Otherwise they appear in a ftp listing as having zero size.
I know it is possible to deal with this. For example, multcloud.com file explorer can deal with them by asking at the time, what format do you want. But not sure how they deal with downloading a directory with several of these files.
An NSP Installer for the Nintendo Switch has support for ftp servers, and allows downloading from them. I connected it to the adapter server, but for some reason it cannot download. I can download fine from it via my computer.
Here a log:
https://pastebin.com/NsmjwHD5
I'm sorry, this could be a problem in the Tinfoil Installer, but it is just using a standard way of connecting.
No LICENSE or LICENSE.md file is present. None of the code files I checked had any copyright or licensing listed.
Please consider adding a LICENSE file.
Advice on several common licenses can be found on http://choosealicense.com/licenses/
Hello,
I got this error: "a Java Exception ocurred" when i run the jar file,
there is instaled the lasted versión of java.
can some one help me?
Thank You
When I start the java app just by double clicking it, I get no console window.
Not a problem because ftp in filziezilla does connect to the google drive it seems.
However, i am trying to upload a 1Tb file.
I had 20Gb free on my C drive, the file being sent is on I: drive.
I start the transfer and it uses all my space on drive C until its full, then crashes.
Hello,
I would like to have a configuration for the anonymous users. Like the ones for the normal users but for the anonymous one where you don't need user and pass. Thank you 😄
Changing the name of an account to anonymous and deleting password didn't help because I get this error: "421 Maximum login limit has been reached."
Thanks!
Is it an option to avoid caching the directory listing and instead request a list from the Google Drive folder every time that Beyond Compare does a Full Refresh?
Is the web service ready for normal usage yet?
I see it listed but still cannot figure out a way to use.
java.lang.RuntimeException: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "usageLimits",
"message" : "User Rate Limit Exceeded",
"reason" : "userRateLimitExceeded"
} ],
"message" : "User Rate Limit Exceeded"
}
at org.andresoviedo.apps.gdrive_ftp_adapter.model.GoogleDrive.list_impl(GoogleDrive.java:549)
at org.andresoviedo.apps.gdrive_ftp_adapter.model.GoogleDrive.list(GoogleDrive.java:522)
at org.andresoviedo.apps.gdrive_ftp_adapter.service.FtpGdriveSynchService.synchFolder(FtpGdriveSynchService.java:313)
at org.andresoviedo.apps.gdrive_ftp_adapter.service.FtpGdriveSynchService.access$300(FtpGdriveSynchService.java:32)
at org.andresoviedo.apps.gdrive_ftp_adapter.service.FtpGdriveSynchService$1$1.call(FtpGdriveSynchService.java:206)
at org.andresoviedo.apps.gdrive_ftp_adapter.service.FtpGdriveSynchService$1$1.call(FtpGdriveSynchService.java:201)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Server reads users when they are put in sequential order
If there are user1, user2 & user4 the server reads only user1 & user2 by defualt when it is started up. Would it be possible to make it read all the users when they dont have to be in numericl sequence?
Thanks again for this lovely program.
Hello everyone,
First of all thank you for this program which is just perfect !!
I would like to use your program in a Docker environment or this one is without GUI ...
Do you have a solution to apply for permission to google account without GUI ?
And even better have you ever thought of deploying your application in a docker so that it is easier to use ?
Regards,
boys3869
Implement http or socks proxy
How to get all File ID and Folder ID in Cache
Tks all
Hello
Thanks a lot for your program, it's just what I was looking for. Seems to work fine so far.
Now I'd like to know how to use it in a multi-account setting, while keeping credentials and data. Thanks in advance for your help.
During the setup of GDFA, it tells me to go to the Google link, which I do, I follow the instructions from Google, after which it takes me to localhost:something/something, I change 'localhost' to the PC's IP its running on, then I get an error from Google saying that the site can't be reached.
Why change localhost to the PCs IP? Because the server I want GDFA running, runs Ubuntu 18.04 LTS Server, meaning it doesn't have a browser.
Any way to fix this or am I doing something wrong?
https://paste.ofcode.org/aVPhzJ55akbsx32kf8cNTz
This is when trying to get files from the FTP Server via Tinfoil, a Switch title installer.
Sorry but I'm not that much familier with the technicality of this program. Thanks a lot for making it this simple that a person like me is running it successfully and is able to know basic things involved here.
Here is this thing I would like to know more about sir. I have a config with 5 users. Whenever I try to terminate the console with ctrl+C (in Windows) it prompts me whether to cancel the batch job or not with Y/N options. I do N and it proceeds in closing the console for me. I would like to know what is batch job here? Also is it possible to add new user on same config from which the old instance is running and add that user in that instance without needing to restart the server which we do using start.cmd? If it's not possible and if it is related to batch job or something (just a wild guess) is it possible to not interrupt the current transfer processes upon closing and restarting the server - done to add new user to it?
Thanks a lot. I hope I am making sense here, because I don't know how this works. And thanks a lot again for implementing my requests in such a timely way.
Cheers>
Thanks a lot for replying to my previous ticket and fully explaining me the batch job functionalities. As per your words in my previous ticket, I am opening this request.
Would really like the running process/es to not interrupt when the server is restarted.
Thanks and best regards.
You rock buddy!
Hello,
I get this issue...
Could not find or load main class google-drive-ftp-adapter-jar-with-dependencies.jar
and
java -jar google-drive-ftp-adapter-jar-with-dependencies.jar Error: Invalid or corrupt jarfile google-drive-ftp-adapter-jar-with-dependencies.jar
the size of the downloaded file is 59KB.
is it good?
Thanks for your help
Some kind of (optional) encryption for files and filenames would be good, as I don't really want to store unencrypted data on google drive.
Hi,
Thanks for your great work, this project is definitly useful!
I'm trying to run your adapter on debian. When I start your application I have got the following output:
java -jar google-drive-ftp-adapter-jar-with-dependencies.jar /etc/google-drive-adapter/config
Implementation-Title:Google Drive FTP Adapter
Implementation-Version:1.2.3
Archiver-Version:Plexus Archiver
Built-By:andres
Specification-Title:Google Drive FTP Adapter
Implementation-Vendor-Id:org.andresoviedo
Created-By:Apache Maven 3.3.9
Build-Jdk:1.8.0_45-internal
Specification-Version:1.2.3
Manifest-Version:1.0
Main-Class:org.andresoviedo.apps.gdrive_ftp_adapter.Main
2017-01-08 13:57:53,942 INFO main Main - Program info: {Archiver-Version=Plexus Archiver, Implementation-Title=Google Drive FTP Adapter, Specification-Version=1.2.3, Implementation-Version=1.2.3, Created-By=Apache Maven 3.3.9, Manifest-Version=1.0, Specification-Title=Google Drive FTP Adapter, Implementation-Vendor-Id=org.andresoviedo, Built-By=andres, Build-Jdk=1.8.0_45-internal, Main-Class=org.andresoviedo.apps.gdrive_ftp_adapter.Main}
2017-01-08 13:57:53,962 INFO main Main - Started with args '[/etc/google-drive-adapter/config]'...
2017-01-08 13:57:53,963 INFO main Main - Loading configuration...
2017-01-08 13:57:53,967 INFO main Main - Loading properties from classpath...
2017-01-08 13:57:53,970 INFO main Main - Properties loaded: '{}'
2017-01-08 13:57:53,972 INFO main Main - Loading properfiles file 'configuration.properties'...
2017-01-08 13:57:53,975 WARN main Main - Exception loading file 'configuration.properties'.
2017-01-08 13:57:53,996 INFO main Main - Properfiles loaded: '{}'
2017-01-08 13:57:53,998 INFO main Main - Loading properfiles file '/etc/google-drive-adapter/config'...
2017-01-08 13:57:54,001 INFO main Main - Properfiles loaded: '{ftp.pass=user, port=1821, os.illegalCharacters=/|[\x00-\x1F\x7F]|`|?|*|\|<|>|||"|:, ftp.user=user, ftp.anonymous.enabled=false, account=default, log4j.fileId=}'
2017-01-08 13:57:54,026 INFO main Main - Property 'log4j.configuration' was not specified in application properties. Using defaults.
2017-01-08 13:57:54,029 INFO main Main - Configuring log4j from 'classpath:/log4j.xml'
2017-01-08 13:57:54,111 INFO main Main - Creating application with configuration '{ftp.pass=user, port=1821, os.illegalCharacters=/|[\x00-\x1F\x7F]|`|?|*|\|<|>|||"|:, log4j.fileId=, account=default, ftp.anonymous.enabled=false, ftp.user=user}'
2017-01-08 13:57:54,340 INFO main SQLiteCache - Loading database 'data/default/gdrive.db'...
Exception in thread "main" org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Error opening connection)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:382)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:456)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:464)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:472)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:477)
at org.andresoviedo.apps.gdrive_ftp_adapter.model.SQLiteCache.(SQLiteCache.java:99)
at org.andresoviedo.apps.gdrive_ftp_adapter.GDriveFtpAdapter.(GDriveFtpAdapter.java:34)
at org.andresoviedo.apps.gdrive_ftp_adapter.Main.main(Main.java:64)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Error opening connection)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
... 8 more
Caused by: java.sql.SQLException: Error opening connection
at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:179)
at org.sqlite.SQLiteConnection.(SQLiteConnection.java:105)
at org.sqlite.JDBC.createConnection(JDBC.java:113)
at org.sqlite.JDBC.connect(JDBC.java:87)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 12 more
Caused by: java.lang.Exception: Error loading native library: /org/sqlite/native/Linux/arm/libsqlitejdbc.so
at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader.java:241)
at org.sqlite.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:63)
at org.sqlite.NativeDB.load(NativeDB.java:50)
at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:175)
... 19 more
The application has created the folders data/default/ but the folders are empty. I've tried to run the application as an administrator and a normal user but I end up with the same result.
Thanks for your help !
Hi,
Thanks for implementing previous request of user's rights and configurable home directory.
Would it be possible to launch adapter from single command for multiple users put in the .properties file? And by default all having the same rights. Currently if I put multiple user:pass in the configuration.properties file adapter reads the last entry.
So if I put,
ftp.user=user1
ftp.pass=user1
ftp.user=user2
ftp.pass=user2
It would open connection for 'user2'.
Thanks a lot for your time on doing this for all of us.
hello, i dont know how github works but i assume i should give my issue here
Once i open it and try to confirm with my gmail account it shows the error :
Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In.
Please Help, thank you.
When opening the ftp on localhost it works. When opening the ftp from another computer within my network it works when I use the internal ip-adres.
When I connect from outside my network and forward the port to my computer I can login, but then the connection is refused.
How can I set it up to accept connections from outside my network. Do I need another port to be opened aswell?
Hello, I currently have your software setup to backup snapshots and videos to Google Drive from security cameras that only support FTP. I am having two problems:
Can you provide advice for debugging this? Would the log help?
One thing I see in the logs is that I get this message for every eventual empty folder:
2016-09-29 19:36:34,705 [pool-4-thread-1196] [GFtpServerFactory$FtpFileSystemView] [WARN ] File doesn't exist or is not a directory: 'FtpFileWrapper [absolutePath=/motion/20160929]'...
This is the adapter trying to open the day's folder and failing even though it does exist. Again, this failure seems to lead to the folder being created as an empty duplicate.
I get no error messages, just that warn message, and thousands of info messages that seem reasonable.
When I connect to ftp via midnight commander, it says "Cannot parse the file ...".
I am not sure if it is mc or google-drive-ftp-adapter problem.
I have installed and tested java on my raspberry pi. So, why when do I get an error whenever I run the file?
When I closed GDFA, and started it again, this Message appeared. Also I can't login to the localhost FTP @ Port 1821, FTP (through cmd) and Firefox are just telling me the Host wouldn't exist / Unknown Host. I'm not sure what I'm doing wrong, I deactivated the Firewall to check if that's the problem, but it didn't help
Thanks for a great product, it looks awesome.
Is it possible NOT to sync the entire Gdrive?
Is it possible to define a root folder for the "google-drive-ftp-adapter" to start instead of the Gdrive root?
NOTE: My Gdrive is more then 10TB and 950K files, I am not interested syncing all the drive.
I have run "google-drive-ftp-adapter" on a very fast internet connection (on windows) it is syncing my drive for the last 5 hours.. :P
Frank
The authentication step that produces the link to follow in a browser to authenticate gdfa uses a callback URI. The port that it listens to seems to be random each time the service is started. Could that be standardized, or is there a way to predict what port it will listen to?
Hi, I get following error messages on my raspi with osmc.
`INFO: Loading database 'data/cache/default.db'...
Jan 08, 2019 11:49:58 PM org.andresoviedo.google_drive_ftp_adapter.Main main
SEVERE: Error loading app
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Co nnection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Error opening connection)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(Dat aSourceUtils.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java: 382)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:45 6)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:46 4)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplat e.java:472)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplat e.java:477)
at org.andresoviedo.google_drive_ftp_adapter.model.SQLiteCache.(SQ LiteCache.java:78)
at org.andresoviedo.google_drive_ftp_adapter.GoogleDriveFtpAdapter.(GoogleDriveFtpAdapter.java:33)
at org.andresoviedo.google_drive_ftp_adapter.Main.main(Main.java:52)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableCon nectionFactory (Error opening connection)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFacto ry(BasicDataSource.java:1549)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:1388)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:1044)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(D ataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(Dat aSourceUtils.java:77)
... 8 more
Caused by: java.sql.SQLException: Error opening connection
at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:179)
at org.sqlite.SQLiteConnection.(SQLiteConnection.java:105)
at org.sqlite.JDBC.createConnection(JDBC.java:113)
at org.sqlite.JDBC.connect(JDBC.java:87)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv erConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable ConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas icDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFacto ry(BasicDataSource.java:1545)
... 12 more
Caused by: java.lang.Exception: Error loading native library: /org/sqlite/native /Linux/arm/libsqlitejdbc.so
at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader. java:241)
at org.sqlite.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:63)
at org.sqlite.NativeDB.load(NativeDB.java:50)
at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:175)
... 19 more
Exception in thread "main" java.awt.AWTError: Assistive Technology not found: or g.GNOME.Accessibility.AtkWrapper
at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:807)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886)
at sun.swing.SwingUtilities2.getSystemMnemonicKeyMask(SwingUtilities2.ja va:2020)
at javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(BasicLo okAndFeel.java:1158)
at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLo okAndFeel.java:431)
at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel. java:148)
at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel. java:1577)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:539)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:579)
at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1349)
at javax.swing.UIManager.initialize(UIManager.java:1459)
at javax.swing.UIManager.maybeInitialize(UIManager.java:1426)
at javax.swing.UIManager.getDefaults(UIManager.java:659)
at javax.swing.UIManager.getString(UIManager.java:805)
at javax.swing.UIManager.getString(UIManager.java:822)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:608)
at org.andresoviedo.google_drive_ftp_adapter.Main.main(Main.java:59)
`
Reference to the above line, I think the problem can be resolved by changing ''client_secrets.json''. So, extracting ''google-drive-ftp-adapter-jar-with-dependencies.jar'' using WinRAR of Windows Explorer (Windows 7) then, changing ''client_secrets.json'' with mine & achieving the folder by using command ''jar cf asdf.jar google-drive-ftp-adapter-jar-with-dependencies
''. Now while running the file using command ''java -jar asdf.jar
'' , this error appears
no main manifest attribute, in asdf.jar
Pls tell me to solve this or any other way.
Platform: Windows 7 Professional 2007
Java version : 1.8.0_291
Best regards
After giving 100% upload, it returns and back again, it is giving error!
Just getting started with the google-drive-ftp-adapter on Windows 10. Set up and running fine.
I have noted a large number of .DOWNLOAD files being created in the Temp directory. These appear to be caches of the files that have been downloaded from google drive to the ftp client machine. Since I am connected to a very large google drive, I want to be sure to cache does not grow to consume huge amounts of disk space on the adapters host system.
So, how are the cache limits set by default and how are they controlled? When is the clean-up of the cache processed? Start up? Shut down? Some other time while running? Only manually?
Thanks for such a wonderful tool.
Don
Would it be possible to have a feature where only certain rights are given. For example I can share the FTP but always fear if some of my friends could delete my files.
So something like Read, Write, Append, Delete and then Directories - List, Sub Dir etc rights if it can be implemented it would be awesome.
Also only a certain directory visible to USER would be awesome too. Like I've many folder but I would like to share only one.
Thanks.
I'm encountering login limit exceeding errors. Can you add the ability for customizing API key?
Many thanks for your project. It really helps me since Drive Sync wasn't available on Linux.
Google Drive allows any character, including / and \ and | and * and ? -- while Windows filesystem does not. Therefore, in Beyond Compare copy and move operations fail when the folder name or filename on Drive contains such illegal characters. I wonder if there is a graceful way to handle that? How about the FTP adapter converts any illegal character to an underscore: _
when I tried to execute google-drive-ftp-adapter, I always stuck at this message : "google-drive-ftp-adapter", please advise.
Having the user/pass of "user" and "user" seems a bit insecure. Is there a way I can change it?
I'm using a script to change the password of the server every 24h, but the adapter has to be rebooted for the new password to work. It would be pretty handy if the server could automatically refresh the password.
Hi,
great program I love it, but a minor issue: can't access to "share with me" files nor the team drive (yes my school use google drive and have team drive so students or personnel can create a drive for the team to use) and there it doesn't appear, would really appreciate it if you can add to the next release.
I am trying to change user and pass to my choice i edited the configuration file but its not working, is there a feature even present to change or its a problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.