Reply to topic

Issue with Importer - upload to CIFS fs

DesG
Registered Member
Posts
5
Karma
0
OS
Following on from some posts on the gwenview-importer blog.

"When trying to import some files from my camera I get the following error:

Could not create temporary upload folder:
Operation not permitted"

The files are not being renamed.

The import directory is not read only, I am able to manually create .gwenview_importer-1234567890 in the import directory. Are you using any strange characters in [random]? It is a CIFS mounted dir.

Cheers, Des.
DesG
Registered Member
Posts
5
Karma
0
OS
strace output
Code: Select all
9950  read(7, "\1\0017\10\0\0\0\0\0\0\0\0%\2\346\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096) = 32
9950  read(7, 0x1fe9f04, 4096)          = -1 EAGAIN (Resource temporarily unavailable)
9950  read(7, 0x1fe9f04, 4096)          = -1 EAGAIN (Resource temporarily unavailable)
9950  stat("/smb", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
9950  stat("/smb/big", {st_mode=S_IFDIR|0777, st_size=0, ...}) = 0
9950  stat("/smb/big/Media", {st_mode=S_IFDIR|0777, st_size=0, ...}) = 0
9950  stat("/smb/big/Media/Photos", {st_mode=S_IFDIR|0777, st_size=0, ...}) = 0
9950  stat("/smb/big/Media/Photos/des photos", {st_mode=S_IFDIR|0777, st_size=0, ...}) = 0
9950  open("/dev/urandom", O_RDONLY)    = 11
9950  read(11, "r`Z\340", 4)            = 4
9950  close(11)                         = 0
9950  mkdir("/smb/big/Media/Photos/des photos//.gwenview_importer-sQxkG2", 0700) = 0
9950  chmod("/smb/big/Media/Photos/des photos//.gwenview_importer-sQxkG2", 0700) = -1 EPERM (Operation not permitted)
9950  write(2, "gwenview_importer(9950)/kdecore "..., 192) = 192
9950  rmdir("/smb/big/Media/Photos/des photos//.gwenview_importer-sQxkG2") = 0


Cheers, Des.
User avatar bcooksley
Administrator
Posts
19763
Karma
87
OS
It appears that Gwenview is, for some reason or another, trying to change the permissions of the folder it is creating on the Samba share. Unfortunately, changing permissions isn't an operation supported by the CIFS file system - so the kernel rejects it as "Operation not permitted".

There is little you can do to fix this unfortunately, other than use a temporary area and move them later.


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]
User avatar agateau
Moderator
Posts
97
Karma
0
OS
DesG wrote:strace output
Code: Select all
9950  chmod("/smb/big/Media/Photos/des photos//.gwenview_importer-sQxkG2", 0700) = -1 EPERM (Operation not permitted)


Looks like the KDE code Gwenview is using to create the temporary import dir fails when it tries to change the permissions of the newly-created dir. There is little need for a change of permission in this case, so I am investigating an alternative. Should be fixed in time for KDE SC 4.8.
User avatar agateau
Moderator
Posts
97
Karma
0
OS
I just committed a simple fix. If you build Gwenview from source, it would be great if you could confirm the bug is fixed for you.
DesG
Registered Member
Posts
5
Karma
0
OS
agateau wrote:
DesG wrote:strace output
Code: Select all
9950  chmod("/smb/big/Media/Photos/des photos//.gwenview_importer-sQxkG2", 0700) = -1 EPERM (Operation not permitted)


Looks like the KDE code Gwenview is using to create the temporary import dir fails when it tries to change the permissions of the newly-created dir. There is little need for a change of permission in this case, so I am investigating an alternative. Should be fixed in time for KDE SC 4.8.


Cheers Aurélien!

Could you also look at the possibility of skipping the "create tempdir/copy to tempdir/move to parent dir/remove tempdir" steps when file renames are not being used?

Regards, Des.
DesG
Registered Member
Posts
5
Karma
0
OS
agateau wrote:I just committed a simple fix. If you build Gwenview from source, it would be great if you could confirm the bug is fixed for you.


I'll give it a try!
User avatar agateau
Moderator
Posts
97
Karma
0
OS
DesG wrote:
Cheers Aurélien!

Could you also look at the possibility of skipping the "create tempdir/copy to tempdir/move to parent dir/remove tempdir" steps when file renames are not being used?

Regards, Des.


Even if the "rename-according-to-date" feature is disabled, a file might need to be renamed anyway if there is already a file with the same name in the import folder. Furthermore, I prefer to avoid having too different behaviors depending on options to reduce the chance of breaking a specific code path I did not test.

 
Reply to topic

Bookmarks



Who is online

Registered users: a17r, Baidu [Spider], Bing [Bot], claydoh, Google [Bot], johngb, joy, raphaelra, wizonesolutions