LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't extract files on samba share (https://www.linuxquestions.org/questions/slackware-14/cant-extract-files-on-samba-share-738766/)

hedron 07-08-2009 09:01 PM

Can't extract files on samba share
 
It happens like this, I open Konqueror and locate a zip file on my samba server. I right click > extract to <folder> and it then gives me a pop up saying, "The extraction operation failed" and below in a box within the pop up it has a bunch of mumbo jumbo saying things like chmod operation not permitted and cannot create <folder>. I'd c/p the entire thing but it won't let me.

I also try in the command line, like this:

Code:

unzip D2_2.59.zip
Archive:  D2_2.59.zip
  creating: D2_2.59/0/
chmod (directory attributes) error: Operation not permitted
error:  cannot create D2_2.59/0/d2N.bin
  creating: D2_2.59/1/
chmod (directory attributes) error: Operation not permitted
error:  cannot create D2_2.59/1/d2N.bin
  creating: D2_2.59/2/
chmod (directory attributes) error: Operation not permitted
error:  cannot create D2_2.59/2/D2N_font.bin
error:  cannot create D2_2.59/2/D2N_rs.bin
warning:  cannot set modification, access times for D2_2.59/2/
warning:  cannot set permissions for D2_2.59/2/
warning:  set times/attribs failed for D2_2.59/2/
warning:  cannot set modification, access times for D2_2.59/1/
warning:  cannot set permissions for D2_2.59/1/
warning:  set times/attribs failed for D2_2.59/1/
warning:  cannot set modification, access times for D2_2.59/0/
warning:  cannot set permissions for D2_2.59/0/
warning:  set times/attribs failed for D2_2.59/0/
    failed setting attrib/times for 3 dir entries

It does something similar when I try to extract a tar.bz2 file:

Code:

tar: gnash-0.8.4/pythonmodule/gnashpython.h: Cannot open: No such file or directory
tar: gnash-0.8.4/pythonmodule/pyGnash.cpp: Cannot open: No such file or directory
tar: gnash-0.8.4/ChangeLog: Cannot open: Permission denied
tar: gnash-0.8.4/libltdl: Cannot mkdir: Permission denied
tar: gnash-0.8.4/libltdl/ltdl.c: Cannot open: No such file or directory
tar: gnash-0.8.4/libltdl/ltdl.h: Cannot open: No such file or directory
tar: gnash-0.8.4/ABOUT-NLS: Cannot open: Permission denied
tar: gnash-0.8.4/ChangeLog-0.8.0: Cannot open: Permission denied
tar: gnash-0.8.4/aclocal.m4: Cannot open: Permission denied
tar: gnash-0.8.4/backend: Cannot mkdir: Permission denied
tar: gnash-0.8.4/backend/PathParser.h: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/render_handler_agg_style.h: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/render_handler_agg_bitmap.h: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/render_handler_ogl.h: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/render_handler_agg.h: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/render_handler_ogl.cpp: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/Makefile.in: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/Makefile.am: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/render_handler.h: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/render_handler_agg_compat.h: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/render_handler_cairo.h: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/render_handler_cairo.cpp: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/PathParser.cpp: Cannot open: No such file or directory
tar: gnash-0.8.4/backend/render_handler_agg.cpp: Cannot open: No such file or directory
tar: gnash-0.8.4/po: Cannot mkdir: Permission denied
tar: gnash-0.8.4/po/it.po: Cannot open: No such file or directory
tar: gnash-0.8.4/po/ja.po: Cannot open: No such file or directory
tar: gnash-0.8.4/po/fi.po: Cannot open: No such file or directory
tar: gnash-0.8.4/po/Makefile.in: Cannot open: No such file or directory
tar: gnash-0.8.4/po/cs.po: Cannot open: No such file or directory
tar: gnash-0.8.4/po/Makefile.am: Cannot open: No such file or directory
tar: gnash-0.8.4/po/es.po: Cannot open: No such file or directory
tar: gnash-0.8.4/po/sv.po: Cannot open: No such file or directory
tar: gnash-0.8.4/po/fr.po: Cannot open: No such file or directory
tar: gnash-0.8.4/po/de.po: Cannot open: No such file or directory
tar: gnash-0.8.4/po/gnash.pot: Cannot open: No such file or directory
tar: gnash-0.8.4/ChangeLog-0.8.2: Cannot open: Permission denied
tar: Error exit delayed from previous errors

Everything works fine if I copy the file to a local folder. As far as I can tell the permissions are fine.

Here is my smb.conf:

Code:

[GLOBAL]

workgroup=XXXXX
server string=Server
netbios name=XXXXX
security=user
hostname lookups=yes
encrypt passwords=yes
hosts allow=192.168.XX.
printcap name=/etc/printcap
printing=CUPS
guest ok=no
browseable=yes
smb passwd file=/etc/samba/private/smbpasswd
username map=/etc/samba/private/smbusers
interfaces = 192.168.XX.XX/24
bind interfaces only = yes
socket options=TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=7200 SO_SNDBUF=7200
local master=yes
remote announce = 192.168.XX.0/XXXXX
max log size=50
log file=/var/log/samba.%m
name resolve order=hosts lmhosts bcast

[Files]

path=/mnt/XXXXX
comment=bleh
guest ok=no
browseable=yes
writeable=yes
valid users=XXXXXX


okos 07-08-2009 11:07 PM

I am not quite sure what you are trying to do.

Are you trying to extract a file on a remote computer?

It is obvious that you have a permission issue.

If you are using Konqueror to extract the file, what are the permissions for the file?

Right click on the file and select properties.
Select the permissions tab.

Who owns the file?

I suggest to use commandline instead of konqueror.

allend 07-08-2009 11:40 PM

Quote:

chmod (directory attributes) error: Operation not permitted
Your Samba share does not have write privileges.

Check the smb.conf on your Samba server.
You will need 'readonly = no' in your share definition if you want all users to be able to write
or else
'valid users = <user name> <user name1>'
'writelist = <user name> <user name1>'
in your share definition if you want to restrict write access to specified users

allend 07-09-2009 01:37 AM

Sorry,
I just read your post more closely and noticed that the share definition in your smb.conf looks OK.
Check the directory permissions on the mount point of your Samba share. Linux file permissions override those set within smb.conf.

hedron 07-09-2009 10:15 PM

I tried the options write list and readonly and restarted samba but no luck.

I did chown -R hedron:users /path/to/share/folder and still the same problem.

The maddening thing is that I can copy and move files, either within the share folder or between both computers, move files to the trash, empty trash, etc but I just can't extract files. Is there some sort of special permissions or user ID that unzip or tar uses that I would need to add to smb.conf? Maybe it uses some odd user name that interferes with the write process.

I can even open a zip file from within konqueror and view text files, though it doesn't seem to want to let me execute files, but I don't think that has anything to do with the problem.

EDIT:

I think I've figured out the problem, or at least I noticed an inconsistency. My user has ID 1000 on the client PC but ID 1001 on my server PC. 1000 is a user account I use solely for ssh. I'm just unsure how to proceed without royally screwing up permissions. I think it would be easiest to create a second user account on my client PC, changing its ID to 1000 and my normal accounts ID to 1001. I'm just unsure how this would affect permissions I have already. Of course, there is always: chown -R ./* Plus, I'm not convinced that this would even work.

allend 07-10-2009 10:43 AM

Try editing /etc/passwd on the client PC and changing ID from 1000 to 1001. If it fixes the problem then you have found the cause. When I have done this it has worked OK, but it has only been when I have recently done a new install and the system in use for only a short time. I have had problems with the change of user ID, but they were simple to fix and the number of changes were minor. If your user data installed base is large, then the task may be a lot more work.

hedron 07-11-2009 12:29 AM

I just wanted to post to say that changing the user ID worked. In case someone else has a similar issue. I will try and come back to edit this post if there is some major issue, but I don't think there will be one.

allend 07-11-2009 09:37 AM

Thanks for reporting back. I am pleased that you were were able to resolve the problem to your satisfaction.


All times are GMT -5. The time now is 01:36 PM.