Expected behaviour
By running ownCloudcmd with option “-n” crendtials should get from “_netrc file” on Windows, instead of prompting for the credentials. (see ownCloud Documentation Overview)
Actual behaviour
I created a “_netrc” file in %USERPROFILE% with follwing content. Reduce ACLs to FullControl by current user only. Create new environment varialble %HOME% pointing to the user profile and test it.
Content of “_netrc”:
machine example.domain.com
login LoginName
password Password
Tested on Windows 10 and Windows 7. With and without reducing the ACLs. I got everytime a prompt for username and password. The sync works, if I enter the credentials or using “-u” & “-p” option. If I use “–non-interactive -n” I get an authentication failed error.
Is there anything more to do on a Windows Client. For example anything to install like “Git for Windows”?
Steps to reproduce
- Created a “_netrc” file in %USERPROFILE% with follwing content.
Content of “_netrc”:
machine example.domain.com
login LoginName
password Password - Create new environment varialble %HOME% pointing to the user profile.
- Running command: “ownCloudcmd -n localPath ownCloud.url”
Server configuration
Operating system: Ubuntu
Web server: Apache
Database: unknown
PHP version: unkown
ownCloud version: 10.0.2
Storage backend (external storage): Auto-Tier (SSD+SAS) Storage Virtualization
Client configuration
Client version: 2.3.2.6928
Operating system: Windows 7 and Windows 10
OS language: German
Qt version used by client package (Linux only, see also Settings dialog): -
Client package (From ownCloud or distro) (Linux only): -
Installation path of client: C:\Program Files (x86)\ownCloud
Logs
Please use Gist (https://gist.github.com/) or a similar code paster for longer
logs.
Template for output < 10 lines
- Client logfile:
!!! OCC::JsonApiJob created for “https://example.domain.com” + “ocs/v1.php/cloud/capabilities” “”
void OCC::AbstractNetworkJob::slotFinished() QNetworkReply::NetworkError(AuthenticationRequiredError) “Host requires authenticat
ion” QVariant(int, 401)
Network error: “ocs/v1.php/cloud/capabilities” “Host requires authentication” QVariant(int, 401)
Server capabilities QVariant(Invalid)
Set proxy configuration to use system configuration
[9] csync_exclude_load Adding entry: ~
[9] csync_exclude_load Adding entry: ~$
[9] csync_exclude_load Adding entry: .~lock.*
[9] csync_exclude_load Adding entry: ~.tmp
[9] csync_exclude_load Adding entry: ].~*
9] csync_exclude_load Adding entry: ]Icon
[9] csync_exclude_load Adding entry: ].DS_Store
[9] csync_exclude_load Adding entry: ].ds_store
[9] csync_exclude_load Adding entry: ._
[9] csync_exclude_load Adding entry: ]Thumbs.db
[9] csync_exclude_load Adding entry: desktop.ini
[9] csync_exclude_load Adding entry: System Volume Information
[9] csync_exclude_load Adding entry: ..sw?
[9] csync_exclude_load Adding entry: ..sw?
[9] csync_exclude_load Adding entry: ].TemporaryItems
[9] csync_exclude_load Adding entry: ].Trashes
[9] csync_exclude_load Adding entry: ].DocumentRevisions-V100
[9] csync_exclude_load Adding entry: ].Trash-
[9] csync_exclude_load Adding entry: .fseventd
[9] csync_exclude_load Adding entry: .apdisk
[9] csync_exclude_load Adding entry: .htaccess
[9] csync_exclude_load Adding entry: .directory
[9] csync_exclude_load Adding entry: *.part
[9] csync_exclude_load Adding entry: *.filepart
[9] csync_exclude_load Adding entry: .crdownload
[9] csync_exclude_load Adding entry: .kate-swp
[9] csync_exclude_load Adding entry: .gnucash.tmp-
[9] csync_exclude_load Adding entry: .synkron.
[9] csync_exclude_load Adding entry: .sync.ffs_db
[9] csync_exclude_load Adding entry: .symform
[9] csync_exclude_load Adding entry: .symform-store
[9] csync_exclude_load Adding entry: .fuse_hidden
[9] csync_exclude_load Adding entry: .unison
[9] csync_exclude_load Adding entry: .nfs
[9] csync_exclude_load Adding entry: My Saved Places.
There are 174374588416 bytes available at “C:/Users/UserName/ownCloud/Test1/” and at least 50000000 are required
===== new sync (no sync journal exists)
“===== Using Qt 5.6.2 SSL library OpenSSL 1.0.2h 3 May 2016 on Windows 7”
sqlite3 version “3.16.1”
Detected filesystem “NTFS” for “C:/Users/UserName/ownCloud/Test1/._sync_e45d37c13c63.db”
sqlite3 journal_mode= “wal”
bool OCC::SyncJournalDb::checkConnect() possibleUpgradeFromMirall_1_5 detected!
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “checkConnect” and starting new transaction
Columns in the current journal: (“phash”, “pathlen”, “path”, “inode”, “uid”, “gid”, “mode”, “modtime”, “type”, “md5”)
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add fileid col” an
d starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure (remotePerm)” and s
tarting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add filesize col”
and starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add inode index” a
nd starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add path index” an
d starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add ignoredChildre
nRemote col” and starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add contentChecksu
m col” and starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add contentChecksu
mTypeId col” and starting new transaction
Columns in the current journal: (“path”, “lastTryEtag”, “lastTryModtime”, “retrycount”, “errorstring”)
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add lastTryTime, i
gnoreDuration cols” and starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add lastTryTime, i
gnoreDuration cols” and starting new transaction
Forcing remote re-discovery by deleting folder Etags
Cleared 0 folder ETags
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “checkConnect End”
void OCC::SyncEngine::startSync() ====NOT Using Selective Sync
Discovery start #################################################### >>
=====Server “” “rootEtagChangesNotOnlySubFolderEtags=0”
[6] csync_statedb_load sqlite3 version “3.16.1”
[6] csync_statedb_load Success
[9] csync_walker file: C:/Users/UserName/ownCloud/Test1/._sync_a4107aad09c8.db [inode=388460 size=81920]
[9] _csync_detect_update ._sync_a4107aad09c8.db excluded (1)
[9] csync_walker file: C:/Users/UserName/ownCloud/Test1/._sync_e45d37c13c63.db [inode=392785 size=4096]
[9] _csync_detect_update ._sync_e45d37c13c63.db excluded (1)
[9] csync_walker file: C:/Users/UserName/ownCloud/Test1/._sync_e45d37c13c63.db-shm [inode=392858 size=32768]
[9] _csync_detect_update ._sync_e45d37c13c63.db-shm excluded (1)
[9] csync_walker file: C:/Users/UserName/ownCloud/Test1/._sync_e45d37c13c63.db-wal [inode=392834 size=127752]
[9] _csync_detect_update ._sync_e45d37c13c63.db-wal excluded (1)
[9] csync_ftw <= Closing walk for C:/Users/UserName/ownCloud/Test1 with read_from_db 0
[8] csync_update Update detection for local replica took 0.03 seconds walking 0 files.
OCC::DiscoveryJob(0x214f840) Calling into main thread…
!!! OCC::LsColJob created for “https://example.domain.com” + “” “OCC::DiscoverySingleDirectoryJob”
Stop request: Authentication failed for “https://example.domain.com/remote.php/webdav/”
void OCC::AbstractNetworkJob::slotFinished() QNetworkReply::NetworkError(OperationCanceledError) “Operation canceled” QVariant(I
nvalid)
void OCC::DiscoverySingleDirectoryJob::lsJobFinishedWithErrorSlot(QNetworkReply*) “Operation canceled” 0 QNetworkReply::NetworkE
rror(OperationCanceledError)
void OCC::DiscoveryMainThread::singleDirectoryJobFinishedWithErrorSlot(int, const QString&) 5 “Operation canceled”
OCC::DiscoveryJob(0x214f840) …Returned from main thread
5 when opening msg= “Operation canceled”
[4] csync_ftw opendir failed for - errno 5
[6] csync_statedb_close sqlite3_close=0
ERROR during csync_update : “An error occurred while opening a folder Operation canceled”
void OCC::SyncJournalDb::close() “C:/Users/UserName/ownCloud/Test1/._sync_e45d37c13c63.db”
No database Transaction to commit
CSync run took 160
void OCC::SyncEngine::abort() QObject(0x0)
void OCC::SyncJournalDb::close() "C:/Users/UserName/ownCloud/Test1/.sync_e45d37c13c63.db"
No database Transaction to commit!!! OCC::JsonApiJob created for “https://example.domain.com” + “ocs/v1.php/cloud/capabilities” “”
void OCC::AbstractNetworkJob::slotFinished() QNetworkReply::NetworkError(AuthenticationRequiredError) “Host requires authenticat
ion” QVariant(int, 401)
Network error: “ocs/v1.php/cloud/capabilities” “Host requires authentication” QVariant(int, 401)
Server capabilities QVariant(Invalid)
Set proxy configuration to use system configuration
[9] csync_exclude_load Adding entry: ~
[9] csync_exclude_load Adding entry: ~$
[9] csync_exclude_load Adding entry: .~lock.*
[9] csync_exclude_load Adding entry: ~.tmp
[9] csync_exclude_load Adding entry: ].~*
*9] csync_exclude_load Adding entry: ]Icon
[9] csync_exclude_load Adding entry: ].DS_Store
[9] csync_exclude_load Adding entry: ].ds_store
[9] csync_exclude_load Adding entry: .*
[9] csync_exclude_load Adding entry: ]Thumbs.db
[9] csync_exclude_load Adding entry: desktop.ini
[9] csync_exclude_load Adding entry: System Volume Information
[9] csync_exclude_load Adding entry: ..sw?
[9] csync_exclude_load Adding entry: ..sw?
[9] csync_exclude_load Adding entry: ].TemporaryItems
[9] csync_exclude_load Adding entry: ].Trashes
[9] csync_exclude_load Adding entry: ].DocumentRevisions-V100
[9] csync_exclude_load Adding entry: ].Trash-
[9] csync_exclude_load Adding entry: .fseventd
[9] csync_exclude_load Adding entry: .apdisk
[9] csync_exclude_load Adding entry: .htaccess
[9] csync_exclude_load Adding entry: .directory
[9] csync_exclude_load Adding entry: *.part
[9] csync_exclude_load Adding entry: *.filepart
[9] csync_exclude_load Adding entry: .crdownload
[9] csync_exclude_load Adding entry: .kate-swp
[9] csync_exclude_load Adding entry: .gnucash.tmp-
[9] csync_exclude_load Adding entry: .synkron.
[9] csync_exclude_load Adding entry: .sync.ffs_db
[9] csync_exclude_load Adding entry: .symform
[9] csync_exclude_load Adding entry: .symform-store
[9] csync_exclude_load Adding entry: .fuse_hidden
[9] csync_exclude_load Adding entry: .unison
[9] csync_exclude_load Adding entry: .nfs
[9] csync_exclude_load Adding entry: My Saved Places.
There are 174374588416 bytes available at “C:/Users/UserName/ownCloud/Test1/” and at least 50000000 are required
===== new sync (no sync journal exists)
“===== Using Qt 5.6.2 SSL library OpenSSL 1.0.2h 3 May 2016 on Windows 7”
sqlite3 version “3.16.1”
Detected filesystem “NTFS” for “C:/Users/UserName/ownCloud/Test1/._sync_e45d37c13c63.db”
sqlite3 journal_mode= “wal”
bool OCC::SyncJournalDb::checkConnect() possibleUpgradeFromMirall_1_5 detected!
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “checkConnect” and starting new transaction
Columns in the current journal: (“phash”, “pathlen”, “path”, “inode”, “uid”, “gid”, “mode”, “modtime”, “type”, “md5”)
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add fileid col” an
d starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure (remotePerm)” and s
tarting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add filesize col”
and starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add inode index” a
nd starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add path index” an
d starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add ignoredChildre
nRemote col” and starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add contentChecksu
m col” and starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add contentChecksu
mTypeId col” and starting new transaction
Columns in the current journal: (“path”, “lastTryEtag”, “lastTryModtime”, “retrycount”, “errorstring”)
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add lastTryTime, i
gnoreDuration cols” and starting new transaction
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “update database structure: add lastTryTime, i
gnoreDuration cols” and starting new transaction
Forcing remote re-discovery by deleting folder Etags
Cleared 0 folder ETags
void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit “checkConnect End”
void OCC::SyncEngine::startSync() ====NOT Using Selective Sync
Discovery start #################################################### >>
=====Server “” “rootEtagChangesNotOnlySubFolderEtags=0”
[6] csync_statedb_load sqlite3 version “3.16.1”
[6] csync_statedb_load Success
[9] csync_walker file: C:/Users/UserName/ownCloud/Test1/._sync_a4107aad09c8.db [inode=388460 size=81920]
[9] _csync_detect_update ._sync_a4107aad09c8.db excluded (1)
[9] csync_walker file: C:/Users/UserName/ownCloud/Test1/._sync_e45d37c13c63.db [inode=392785 size=4096]
[9] _csync_detect_update ._sync_e45d37c13c63.db excluded (1)
[9] csync_walker file: C:/Users/UserName/ownCloud/Test1/._sync_e45d37c13c63.db-shm [inode=392858 size=32768]
[9] _csync_detect_update ._sync_e45d37c13c63.db-shm excluded (1)
[9] csync_walker file: C:/Users/UserName/ownCloud/Test1/._sync_e45d37c13c63.db-wal [inode=392834 size=127752]
[9] _csync_detect_update ._sync_e45d37c13c63.db-wal excluded (1)
[9] csync_ftw <= Closing walk for C:/Users/UserName/ownCloud/Test1 with read_from_db 0
[8] csync_update Update detection for local replica took 0.03 seconds walking 0 files.
OCC::DiscoveryJob(0x214f840) Calling into main thread…
!!! OCC::LsColJob created for “https://example.domain.com” + “” “OCC::DiscoverySingleDirectoryJob”
Stop request: Authentication failed for “https://example.domain.com/remote.php/webdav/”
void OCC::AbstractNetworkJob::slotFinished() QNetworkReply::NetworkError(OperationCanceledError) “Operation canceled” QVariant(I
nvalid)
void OCC::DiscoverySingleDirectoryJob::lsJobFinishedWithErrorSlot(QNetworkReply*) “Operation canceled” 0 QNetworkReply::NetworkE
rror(OperationCanceledError)
void OCC::DiscoveryMainThread::singleDirectoryJobFinishedWithErrorSlot(int, const QString&) 5 “Operation canceled”
OCC::DiscoveryJob(0x214f840) …Returned from main thread
5 when opening msg= “Operation canceled”
[4] csync_ftw opendir failed for - errno 5
[6] csync_statedb_close sqlite3_close=0
ERROR during csync_update : “An error occurred while opening a folder Operation canceled”
void OCC::SyncJournalDb::close() “C:/Users/UserName/ownCloud/Test1/._sync_e45d37c13c63.db”
No database Transaction to commit
CSync run took 160
void OCC::SyncEngine::abort() QObject(0x0)
void OCC::SyncJournalDb::close() “C:/Users/UserName/ownCloud/Test1/._sync_e45d37c13c63.db”
No database Transaction to commit
-
Web server error log: -
-
Server logfile: ownCloud log (data/owncloud.log): -