Permission denied tries to add a file to a mounted directory

I am having trouble understanding why I cannot add the file to the python3 file (3.2.3). I create these files in a shared folder, but I cannot add them. There are no file problems in my home folder. Shared Folder Permissions:

drwxrwxrwx 2 nobody share 65536 2017-01-01 22:16 Pictures 

I am in the "share" group, which has all permissions:

 groups alex share www-data 

I can create a file:

 >>> testFile=open ('VID_2.mp4', 'wb') >>> testFile.close() 

But I can not add to it:

 >>> testFile=open ('VID_2.mp4', 'ab') Traceback (most recent call last): File "<stdin>", line 1, in <module> IOError: [Errno 13] Permission denied: 'VID_2.mp4' 

I checked the permissions of the file and, in my opinion, I could add to this file:

 ls -l -rw-rw-rw- 1 alex share 0 2017-01-01 22:40 VID_2.mp4 

So, I'm confused about why append is allowed to add, and what permission will be required to add.

UPDATE: It seems the problem is not in the python script, since I get the same permission error if I use echo :

 touch myfile.txt echo 1 > myfile.txt echo 2 >> myfile.txt -bash: myfile.txt Permission denied ls -l myfile.txt -rw-rw-rw- 1 alex share 2 2017-01-03 09:44 myfile.txt 

UPDATE 2:

These folders are under normal mount (/ DataVolume):

 /dev/sda4 on /DataVolume type ext4 (rw,noatime,nodiratime) /DataVolume/cache on /CacheVolume type none (rw,bind) /DataVolume/shares on /shares type none (rw,bind) /DataVolume/shares on /nfs type none (rw,bind) cat /proc/mounts /dev/sda4 /DataVolume ext4 rw,noatime,nodiratime,barrier=1,data=ordered 0 0 /dev/sda4 /CacheVolume ext4 rw,noatime,nodiratime,barrier=1,data=ordered 0 0 /dev/sda4 /shares ext4 rw,noatime,nodiratime,barrier=1,data=ordered 0 0 /dev/sda4 /nfs ext4 rw,noatime,nodiratime,barrier=1,data=ordered 0 0 

I can add files to /DataVolume/home/alex , but not files under /DataVolume/shares :

 ls -l /DataVolume/ drwxrwxr-x 4 root root 65536 2013-11-14 21:15 home drwxrwxr-x 7 root share 65536 2017-01-04 10:16 shares ls -l /DataVolume/home/ drwxr-xr-x 7 alex share 65536 2017-01-01 22:24 alex ls -l /DataVolume/home/alex -rw-rw-rw- 1 alex share 4 2017-01-04 10:20 test.txt ls -l /DataVolume/shares/ drwxrwxrw- 2 alex share 65536 2017-01-04 10:23 test 
+6
source share

Source: https://habr.com/ru/post/1013694/


All Articles