Can view shares in Dolphin but cannot write to them

Can view shares in Dolphin but cannot write to them

Postby mosed » Jul 9th, '13, 09:34

Hi all, this may seem stupidly simple to someone with a bit of experience but I have been reading and 'trying' and still cannot either understand or make progress....

I have a Zyxel NAS (running some form of Linux I think) with various shares. I want to eventually write all our data to the NAS rather than a local machine so each corresponding folder such as 'Download' , 'Docs' etc will be on the NAS in each user's share. However, although I can view the shares and open/play files from Dolphin and the shares appear when I select the Samba setup with the Mageia config utulity I cannot alter anything or write new files. In the Samba setup screen I can see the shares but they fail to mount. Is this because they are already mounted in Dolphin? When I click on share NFS shared drives and directories I get "the following packages need to be intstalled nfs-utils, nmap". Both of these show as installed in the package manager. Confused..

I took a look at the samba conf file and I'm clueless. I also tried to get Swat up and running (using the guide on the Samba page) as I thought it may be useful to a beginner but no joy there also.

I could do with a bit of help, even if it's a just point in the right direction.
mosed
 
Posts: 4
Joined: Jul 8th, '13, 13:57

Re: Can view shares in Dolphin but cannot write to them

Postby magfan » Jul 9th, '13, 12:04

Don't worry about the NFS packages - it is just a harmless (but confusing) bug. Anyway.

Most likely you will not need NFS to mount the partitions. In my case I am mounting an Allnet NAS server via CIFS although internally the Allnet server is running linux. For this I created a user "nas" and a group "nas" on my Mageia system and use a credentials file:
Code: Select all
# in /etc/fstab:
//allnet/data /mnt/allnet/data cifs auto,users,credentials=/home/nas/.allnet_credentials,file_mode=0664,dir_mode=0755 0 0

On my Mageia system I added those users to the group "nas" who should get access to the data on the NAS server. Then I had to make sure that names and access rights of the NAS users are identical with those on the Mageia system. The credentials file contains just two lines for username and password:
Code: Select all
cat /home/nas/.allnet_credentials
username=nas
password=secretword

You can probably already see your NAS server in Mageia mcc if you search for samba servers. If samba is not installed on your Mageia system it should be installed once you try to use samba functionality (server/client) from within mcc. And here you won't get messages about missing packages once they are installed...
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: Can view shares in Dolphin but cannot write to them

Postby wintpe » Jul 9th, '13, 13:12

sorry to contradict magfan, although samba is a perfectly good way of accessing a nas,
if your nas supports NFS, then thats the way to go with linux.

linux to linux via cifs/samba does not make any sense, its like using ftp.

NFS is a high performance network file system, and if you need help is setting it up, just ask.

from the specs of the zytel nas (and just to support my views, this is as they print it on their we site)

System Specifications
Network Protocol

CIFS/SMB for Windows
NFS for Linux and Unix
DHCP client
PPPoE


regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Can view shares in Dolphin but cannot write to them

Postby magfan » Jul 9th, '13, 13:36

Yes, wintpe is right and I use NFS for pure Linux/Unix to Linux/Unix connections. But the old Allnet server I am using does not support NFS. So, I just wanted to show a working approach in case NFS does not work. Adjusting user names and access rights on both the Mageia system and the NAS server should do the trick. Just ignore the messages about missing packages.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: Can view shares in Dolphin but cannot write to them

Postby mosed » Jul 9th, '13, 14:03

Hi and thanks for your replies.....

I will be running a mixed network of windows 7, possibly windows xp, possibly linux for a netflix etc media server, and linux for pcs (if i can get my wife to convert!!). From what I have seen linux is better for networking - windows just looses shares all the time, certainly with 7 home edition. The NAS I'm connecting to is the Zyxel 325 and my router is a Zyxel 660HN-F1.

So... what is better for my setup? Samba or NFS? I don't mind a bit of work and even a learning curve but I am new to linux so until I have got into the groove I could do with some kid gloves.
mosed
 
Posts: 4
Joined: Jul 8th, '13, 13:57

Re: Can view shares in Dolphin but cannot write to them

Postby mosed » Jul 9th, '13, 22:56

I created a group on the nas AND mageia 'nas'. i made sure the users are the same with the same passwords. I change the workgroup to something else. the net result is that i can see the shares in mcc but they dont show up in dolphin - i can navigate to them but clicking on them results in seeing nothing. If i try and mount these shares in mcc it fails. What gives??
mosed
 
Posts: 4
Joined: Jul 8th, '13, 13:57

Re: Can view shares in Dolphin but cannot write to them

Postby magfan » Jul 10th, '13, 11:09

mosed wrote:Hi and thanks for your replies.....

I will be running a mixed network of windows 7, possibly windows xp, possibly linux for a netflix etc media server, and linux for pcs (if i can get my wife to convert!!). From what I have seen linux is better for networking - windows just looses shares all the time, certainly with 7 home edition. The NAS I'm connecting to is the Zyxel 325 and my router is a Zyxel 660HN-F1.

So... what is better for my setup? Samba or NFS? I don't mind a bit of work and even a learning curve but I am new to linux so until I have got into the groove I could do with some kid gloves.


There are two options:

1. You have only Linux and Windows Vista/7 Ultimate systems. In this case NFS is the best choice. You have to enable NFS services in your Windows systems to mount shared NFS folders in your network.

2. If you have Windows 2k or any Windows Vista/7 version below "Ultimate" you have to use freeware tools like "nekodrive" if you want to stick with NFS. If you do not want to install additional software you have to use samba. At least for your Windows systems.

In a mixed environment where at least one system requires samba you have again two choices:

1. You use samba for all systems. This option makes Windows systems happy and linux can at least deal with it.

2. You use samba only for those systems which require samba but NFS for the rest.

My personal choice would be the last one. And just in case you have an USB printer without network connection: you could probably attach it to your NAS server and share it via samba - for all systems in the network.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: Can view shares in Dolphin but cannot write to them

Postby magfan » Jul 10th, '13, 11:34

mosed wrote:I created a group on the nas AND mageia 'nas'. i made sure the users are the same with the same passwords. I change the workgroup to something else. the net result is that i can see the shares in mcc but they dont show up in dolphin - i can navigate to them but clicking on them results in seeing nothing. If i try and mount these shares in mcc it fails. What gives??

Can you just see the shares or can you connect to them in mcc? Which user connects to the shares? A group alone cannot connect to them.

Example: If user magfan connects to some shares this user may belong to many groups - including 'nas'. But for mounting the shares magfan will use his primary group - which is most likely not 'nas'. So if you are not member of magfans primary group you will not be able to look into the shares.
Last edited by magfan on Jul 10th, '13, 11:35, edited 1 time in total.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: Can view shares in Dolphin but cannot write to them

Postby rAC » Jul 10th, '13, 11:34

wintpe wrote:sorry to contradict magfan, although samba is a perfectly good way of accessing a nas,
if your nas supports NFS, then thats the way to go with linux.

linux to linux via cifs/samba does not make any sense, its like using ftp.

...
regards peter


Peter,
if you are networking in a mixed environment this may not necessarily be the case.
If mosed (the OP) has to run cifs to support windows clients he may not be 'better off' requiring his NAS to run NFS in addition to cifs. I know that I am in a similar situation with a home network of Macs, Linux and Windows - cifs seemed to be the common service that all three systems can run -therefor if I get cifs going I can not run on the resource limited NAS two services (AFP and NFS). However, I think I have given up this ideal.
I have been doing my 'homework' starting with studying man mount.cifs. Researching on line for help and examples I can find of mounting cifs but I cannot crack it with Mageia and my ReadyNAS nv+ v2.
On that there seems to be a bit of a 'gap' in the stuff I have found so far - for example are server names are case sensitive - some of the examples seem to indicate that they are case insensitive giving them on the mount command line in all upper case notwithstanding showing them lower case elsewhere.
rAC
 
Posts: 20
Joined: Sep 28th, '11, 11:23

Re: Can view shares in Dolphin but cannot write to them

Postby mosed » Jul 10th, '13, 13:01

magfan wrote:Can you just see the shares or can you connect to them in mcc? Which user connects to the shares? A group alone cannot connect to them.

Example: If user magfan connects to some shares this user may belong to many groups - including 'nas'. But for mounting the shares magfan will use his primary group - which is most likely not 'nas'. So if you are not member of magfans primary group you will not be able to look into the shares.


In MCC..
1. Under "Access NFS shares and directories" I can only see "localhost" when I "search for servers" I get an error prior to that telling me I have not installed some software that I have have installed - imaps etc.
2.Under "Access windows (SMB) shares and directories" I can see the NAS and expand it to view the shares. The shares show up as type CIFS, some are public folders such as video, music, photos and public, these fail to mount, there is a % symbol in the user name and nothing in the password. Removing the % does nothing either. The mount points are /mnt/videos and so on. The user shares will also not mount even when I put the corresponding username and password in.

Users on the NAS and the Mageia PC have been synchronised so that the users, groups, primary groups are all in sync, ie user MAG1 is on the NAS and Mageia PC belonging only to one group which is the same on both machines.

In Dolphin now nothing shows up. If I navigate to "/" and then to "mnt" I can see the shares but they don't contain anything - no files.

Also, checking on the NAS specs it states it supports "CIFS/SMB, NFS (for Linux/Unix)" - http://www.zyxel.com/uk/en/products_services/nsa325.shtml?t=p

Someone mentioned the printer.. Under Windows I was able to just put the printer (Brother HL-2270DW) on the network and it worked. Since there is no room for a printer where I have the NAS and I don't really want to have bought a networkable Laser printer for it to be only used via USB I would prefer the Printer to be it's own server. I have yet to bother trying to get the printer installed. But then I guess that will be another post :)
mosed
 
Posts: 4
Joined: Jul 8th, '13, 13:57

Re: Can view shares in Dolphin but cannot write to them

Postby rAC » Jul 10th, '13, 13:10

mosed wrote:..
In MCC..
1. Under "Access NFS shares and directories" I can only see "localhost" when I "search for servers" I get an error prior to that telling me I have not installed some software that I have have installed - imaps etc.
2.Under "Access windows (SMB) shares and directories" I can see the NAS and expand it to view the shares. The shares show up as type CIFS, some are public folders such as video, music, photos and public, these fail to mount, there is a % symbol in the user name and nothing in the password. Removing the % does nothing either. The mount points are /mnt/videos and so on. The user shares will also not mount even when I put the corresponding username and password in.

Users on the NAS and the Mageia PC have been synchronised so that the users, groups, primary groups are all in sync, ie user MAG1 is on the NAS and Mageia PC belonging only to one group which is the same on both machines.

In Dolphin now nothing shows up. If I navigate to "/" and then to "mnt" I can see the shares but they don't contain anything - no files.

Also, checking on the NAS specs it states it supports "CIFS/SMB, NFS (for Linux/Unix)" - http://www.zyxel.com/uk/en/products_services/nsa325.shtml?t=p


pretty much the same as I see when trying with a Netgear ReadyNASnv+ v2. I am wondering if anyone has cifs working with Mageia?
rAC
 
Posts: 20
Joined: Sep 28th, '11, 11:23

Re: Can view shares in Dolphin but cannot write to them

Postby magfan » Jul 11th, '13, 09:57

rAC wrote:
mosed wrote:..
In MCC..
1. Under "Access NFS shares and directories" I can only see "localhost" when I "search for servers" I get an error prior to that telling me I have not installed some software that I have have installed - imaps etc.
2.Under "Access windows (SMB) shares and directories" I can see the NAS and expand it to view the shares. The shares show up as type CIFS, some are public folders such as video, music, photos and public, these fail to mount, there is a % symbol in the user name and nothing in the password. Removing the % does nothing either. The mount points are /mnt/videos and so on. The user shares will also not mount even when I put the corresponding username and password in.

Users on the NAS and the Mageia PC have been synchronised so that the users, groups, primary groups are all in sync, ie user MAG1 is on the NAS and Mageia PC belonging only to one group which is the same on both machines.

In Dolphin now nothing shows up. If I navigate to "/" and then to "mnt" I can see the shares but they don't contain anything - no files.

Also, checking on the NAS specs it states it supports "CIFS/SMB, NFS (for Linux/Unix)" - http://www.zyxel.com/uk/en/products_services/nsa325.shtml?t=p


pretty much the same as I see when trying with a Netgear ReadyNASnv+ v2. I am wondering if anyone has cifs working with Mageia?


Yes, I do have it working. This time I attached a screenshot of some mcc windows which show the configuration details on my Mageia system. Unfortunately there is no comfortable overview window from the Allnet NAS. But the options there are very limited anyway. I can create users and groups, add users to a specific group and give read or read/write access for users/groups to specific directories. I cannot set user IDs. Most likely the user ID for magfan on the NAS is even different from that one the Mageia system. But who cares as long as it is working?

One thing may be important and I remember I had problems with accessing the NAS in the beginning: the base directory which I mount had to be configured as "public" and "searchable" for all users on the NAS. Without this option I could not access "/mnt/allnet/data" with "data" being the base directory on the NAS (from fstab: //allnet/data /mnt/allnet/data ...).

After starting an ftp-server on the NAS I could login via gFTP to the NAS, but only as normal user, not as 'admin'. I just had to use the same ftp port. The default port was different in gFTP and the NAS.

About printers there is not much to say. A network printer should remain in the network. But a pure USB printer without network functionality could be connected to a NAS. The NAS then could share it via samba in the network.
Attachments
cifs_allnet.png
SMB/CIFS configuration on Mageia 2
cifs_allnet.png (307.02 KiB) Viewed 9510 times
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: Can view shares in Dolphin but cannot write to them

Postby magfan » Jul 11th, '13, 11:25

I just realized that I accidentially unchecked on the option "nosuid" when I made the screenshot. Sorry! On my system this option is checked...
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: Can view shares in Dolphin but cannot write to them

Postby magfan » Jul 11th, '13, 12:56

Finally I had the time to do some tests with the default settings of mcc for SMB/CIFS access (username: %, password: , no advanced options):

1. I created a new directory on the NAS with the options "searchable" and "Public = yes". In mcc I could see that directory and I could easily mount it (default_cifs_ok.png). Also, any user from my Mageia system could go to that directory and create/delete directories directly on the NAS via console or dolphin.

2. After changing "Public = no" I could still see that directory in mcc but I could not connect to it anymore (default_cifs_failed.png).

So, the main question for me is whether your NAS has somewhere a "public" option. And one last hint: in our local network my Mageia system does not use a firewall...
Attachments
default_cifs_ok.png
default_cifs_ok.png (120.36 KiB) Viewed 9500 times
default_cifs_failed.png
default_cifs_failed.png (140.45 KiB) Viewed 9500 times
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: Can view shares in Dolphin but cannot write to them

Postby wintpe » Jul 25th, '13, 18:21

sorry been on hols for a couple of weeks, since posting

my server which runs centos exports NFS for all unix systems and samba for all windows systems.

this is the best option i find for performance reasons.

problems you will encounter if you use samba with mageia.

try to play an large mpeg over samba, it will attempt to copy it over to the workstation first, taking time, and space in temp.

over NFS its just as if its local, any sizes, and im talking 20 gig blue ray files.

so a server supporting both protocols is the best way.

you could run a naming service like nis to keep all NFS servers and workstaions UID's in sync, but if its just a small family affair, then probably less trouble just syncing passwd/group and shadow files around.

as for windows, well windows with samba needs the windows login and the unix login to be the same, as windows and linux use different UID/GID mechanism, so the only way to map them is same name, unless you use the samba name mapping file, but thats a pain to maintain.

mageias default NFS client settings performs quite badly, and you can make mageia automount NFS directories as follows.

install the autofs package and enable it with chkconfig autofs on

followed by service autofs start

add the following to /etc/autofs/auto.master

/net -hosts -rw,soft,bg,tcp,vers=3,rsize=262144,wsize=262144

you may need to restart autofs

now in dolphin, just put in /net/hostname of the nfs server ( add a ipaddress - hostname to /etc/hosts if you dont have a dns server)

and you will be able to browse and see all of the shares on the server and mount them with the opimum performance settings.

on the server share the areas you want to share with the NFS protocol.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Can view shares in Dolphin but cannot write to them

Postby doktor5000 » Jul 26th, '13, 00:56

wintpe wrote:try to play an large mpeg over samba, it will attempt to copy it over to the workstation first, taking time, and space in temp.

Isn't that only a KDE/kio slave-related problem?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18051
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can view shares in Dolphin but cannot write to them

Postby wintpe » Jul 28th, '13, 18:43

you may be write since i only ever use kde.

however not a problem with NFS

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Can view shares in Dolphin but cannot write to them

Postby magfan » Aug 2nd, '13, 08:35

I found something else which may solve your cifs mounting problem. In case of newer kernels the security level for cifs mounts has been changed (https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=81bcd8b795229c70d7244898efe282846e3b14ce). So if you try to mount a relatively old NAS server which does not know about the new default security level (sec=ntlm2) any mounting attempt will fail. You have to set the following option explicitly "sec=ntlm". A valid fstab entry would look like this:

Code: Select all
//allnet/data /mnt/allnet/data cifs credentials=/etc/samba/auth.allnet.nas,file_mode=0664,nosuid,sec=ntlm,nodev,noexec,dir_mode=0755 0 0
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron