handyman5 / acd_fuse

FUSE filesystem driver for Amazon Cloud Drive
Other
187 stars 23 forks source link

Creating new files with touch results in "No such file or directory" error. #18

Open tentious opened 9 years ago

tentious commented 9 years ago

I get this when trying to create a new file using touch.

user@host:/mnt/acd/testing123# touch test123.txt touch: failed to close ‘test123.txt’: No such file or directory

If I run fuse with debug on (-d option), ./acd /mnt/acd -oemail='',password='',umask=002,allow_other -d I get the below. Note the 400:Bad Request when looking up info on the new files being created.

unique: 691, opcode: LOOKUP (1), nodeid: 5, insize: 52, pid: 7083 LOOKUP /testing123/test123.txt getattr /testing123/test123.txt PyAmazonCloudDriveError: https://www.amazon.com/clouddrive/api/?ContentType=JSON&populatePath=true&path=%2Ftesting123%2Ftest123.txt&Operation=getInfoByPath&customerId=&_= {'X-amzn-sessionid': ''} 400:Bad Request unique: 691, error: -2 (No such file or directory), outsize: 16 unique: 692, opcode: CREATE (35), nodeid: 5, insize: 68, pid: 7083 create flags: 0x8841 /testing123/test123.txt 0100644 umask=0022 create[0] flags: 0x8841 /testing123/test123.txt getattr /testing123/test123.txt NODEID: 8 unique: 692, success, outsize: 160 unique: 693, opcode: FLUSH (25), nodeid: 8, insize: 64, pid: 7083 flush[0] unique: 693, error: -2 (No such file or directory), outsize: 16 unique: 694, opcode: SETATTR (4), nodeid: 8, insize: 128, pid: 7083 utime /testing123/test123.txt 1428960503 1428960503 getattr /testing123/test123.txt unique: 694, success, outsize: 120 unique: 695, opcode: FLUSH (25), nodeid: 8, insize: 64, pid: 7083 flush[0] unique: 695, error: -2 (No such file or directory), outsize: 16 unique: 696, opcode: RELEASE (18), nodeid: 8, insize: 64, pid: 0 release[0] flags: 0x8801 unique: 696, success, outsize: 16

tentious commented 9 years ago

Using Ubuntu 14.04.2 updated and using latest kernel.

Doing more testing. Now when I copy a few files at random, around 6-7, some copy without a problem, some won't, seemingly at random. When trying to copy or create a new file, I now get this error:

Command: touch /mnt/acd/testing123/test.txt touch: setting times of ‘/mnt/acd/testing123/test.txt’: No such file or directory

Error when running -d option, fuse debug:

unique: 71, opcode: LOOKUP (1), nodeid: 1, insize: 51, pid: 7716 LOOKUP /testing123 getattr /testing123 NODEID: 2 unique: 71, success, outsize: 144 unique: 72, opcode: LOOKUP (1), nodeid: 2, insize: 49, pid: 7716 LOOKUP /testing123/test.txt getattr /testing123/test.txt PyAmazonCloudDriveError: https://www.amazon.com/clouddrive/api/?ContentType=JSON&populatePath=true&path=%2Ftesting123%2Ftest.txt&Operation=getInfoByPath&customerId=obfuscated&_=obfuscated {'X-amzn-sessionid': 'obfuscated'} 400:Bad Request unique: 72, error: -2 (No such file or directory), outsize: 16 unique: 73, opcode: CREATE (35), nodeid: 2, insize: 65, pid: 7716 create flags: 0x8841 /testing123/test.txt 0100644 umask=0022 Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/fuse.py", line 362, in call return apply(self.func, args, kw) File "/usr/lib/python2.7/dist-packages/fuse.py", line 778, in wrap res = fun(_a, *_kw) File "./acd", line 387, in create self.infocache[path] = self.api.create_by_path(head.encode('utf_8'), tail.encode('utf_8')) File "/opt/acd/pyacd/pyacd/api.py", line 404, in create_by_path resp_json=json.loads(pyacd.do_get(end_point)) File "/opt/acd/pyacd/pyacd/connection.py", line 32, in do_get return _do_request(req,None) File "/opt/acd/pyacd/pyacd/connection.py", line 85, in _dorequest e.msg pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: https://www.amazon.com/clouddrive/api/?ContentType=JSON&name=test.txt&conflictResolution=RENAME&overwrite=false&path=%2Ftesting123&Operation=createByPath&autoparent=true&type=FILE&customerId=obfuscated&=obfuscated {'X-amzn-sessionid': 'obfuscated} 400:Bad Request unique: 73, error: -22 (Invalid argument), outsize: 16 unique: 74, opcode: LOOKUP (1), nodeid: 2, insize: 49, pid: 7716 LOOKUP /testing123/test.txt getattr /testing123/test.txt PyAmazonCloudDriveError: https://www.amazon.com/clouddrive/api/?ContentType=JSON&populatePath=true&path=%2Ftesting123%2Ftest.txt&Operation=getInfoByPath&customerId=obfuscated&_=obfuscated {'X-amzn-sessionid': 'obfuscated'} 400:Bad Request unique: 74, error: -2 (No such file or directory), outsize: 16

tentious commented 9 years ago

When copying the LICENSE file from this project as an example I get the below:

command: user@host:/opt/acd# cp LICENSE /mnt/acd/testing123/

results: cp: cannot create regular file ‘/mnt/acd/testing123/LICENSE’: Invalid argument

Error when running -d option, fuse debug:

unique: 88, opcode: LOOKUP (1), nodeid: 1, insize: 51, pid: 7729 LOOKUP /testing123 getattr /testing123 NODEID: 2 unique: 88, success, outsize: 144 unique: 89, opcode: LOOKUP (1), nodeid: 2, insize: 48, pid: 7729 LOOKUP /testing123/LICENSE getattr /testing123/LICENSE PyAmazonCloudDriveError: https://www.amazon.com/clouddrive/api/?ContentType=JSON&populatePath=true&path=%2Ftesting123%2FLICENSE&Operation=getInfoByPath&customerId= obfuscated&= obfuscated {'X-amzn-sessionid': 'obfuscated'} 400:Bad Request unique: 89, error: -2 (No such file or directory), outsize: 16 unique: 90, opcode: LOOKUP (1), nodeid: 2, insize: 48, pid: 7729 LOOKUP /testing123/LICENSE getattr /testing123/LICENSE PyAmazonCloudDriveError: https://www.amazon.com/clouddrive/api/?ContentType=JSON&populatePath=true&path=%2Ftesting123%2FLICENSE&Operation=getInfoByPath&customerId= obfuscated&= obfuscated {'X-amzn-sessionid': 'obfuscated'} 400:Bad Request unique: 90, error: -2 (No such file or directory), outsize: 16 unique: 91, opcode: CREATE (35), nodeid: 2, insize: 64, pid: 7729 create flags: 0x80c1 /testing123/LICENSE 0100644 umask=0022 Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/fuse.py", line 362, in call return apply(self.func, args, kw) File "/usr/lib/python2.7/dist-packages/fuse.py", line 778, in wrap res = fun(_a, *_kw) File "./acd", line 387, in create self.infocache[path] = self.api.create_by_path(head.encode('utf_8'), tail.encode('utf_8')) File "/opt/acd/pyacd/pyacd/api.py", line 404, in create_by_path resp_json=json.loads(pyacd.do_get(end_point)) File "/opt/acd/pyacd/pyacd/connection.py", line 32, in do_get return _do_request(req,None) File "/opt/acd/pyacd/pyacd/connection.py", line 85, in _dorequest e.msg pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: https://www.amazon.com/clouddrive/api/?ContentType=JSON&name=LICENSE&conflictResolution=RENAME&overwrite=false&path=%2Ftesting123&Operation=createByPath&autoparent=true&type=FILE&customerId= obfuscated&= obfuscated {'X-amzn-sessionid': 'obfuscated'} 400:Bad Request unique: 91, error: -22 (Invalid argument), outsize: 16

pmknutsen commented 8 years ago

Same here. I cannot copy or touch files. If I mount acd in a second users' space though, I can see files I created with the first user. If I su back to the first user, create a new file (and get the error reported above) and then su back to the second users I do not see the new file unless I make some other change in the directory (like deleting another file or directory).

Beyond the error reported here, it also seems as if there is some incorrect buffering of directory contents that isn't reset by a simple ls.

Has anyone had success copying files? As is, I cannot create new files or copy files into the mounted drive. Only creating directories seems possible.