Re: cifs replacing smbfs - how to set up?
in the samba server file you have a 'workgroup' name - give this as the 'domain' to the cifs mount options. also, you can run the samba server on the linux machine in debug mode, re-connect the client, perform the operation and start reading the log... it's not trivial, but it's do-able. --guy Herouth Maoz wrote: On 15/06/2009, at 23:31, guy keren wrote: when i switched from smbfs to cifs - i added the 'domain=' parameter, and used the name defined on the samba server - and had no similar problems. did you try this? also, i didn't use the file_mode, dir_mode or setuids optoins, that you are using. i would try to remove them and see if there's any change. finally - what distribution+version is your client? the same for the linux server? this might be relevant information. My client distro is Mandriva 2009.0 - kernel 2.6.27.21-desktop-1mnb The server on that particular machine is Debian - kernel 2.6.18-6-686. All of our servers are debians, though not all are the same version. As for the domain argument - what should I set it to? I removed the file_mode and dir_mode parameters, but no help there - I still can't copy a file to an existing file. Removing them just makes the file permissions I get in ls be funny: Running ls -l on the client machine gives: total 8 -rwxrwSrwx 1 herouth herouth 121 2009-03-11 18:06 create_dev_pgsql.sql* -rwxrwSrwx 1 herouth herouth 125 2009-03-11 18:06 create_prod_pgsql.sql* drwxrwxrwx 1 herouth herouth 0 2009-03-17 15:51 CVS/ Running it on the server machine (connecting with ssh) gives: total 12 drwxr-xr-x 2 herouth herouth 4096 Mar 17 15:51 CVS -rw-r--r-- 1 herouth herouth 121 Mar 11 18:06 create_dev_pgsql.sql -rw-r--r-- 1 herouth herouth 125 Mar 11 18:06 create_prod_pgsql.sql Of course the permissions displayed on the client machine are ridiculous. Adding the file_mode and dir_mode parameters gives me normal permissions, which are similar most of the time to the real permissions. Further help would be appreciated. ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: cifs replacing smbfs - how to set up?
On Mon, Jun 15, 2009 at 5:19 PM, Herouth Maozhero...@spamcop.net wrote: Up until recently I used to have smbfs mounts to all the development and some of the production servers in my company. I used to mount as a particular user in the host machine, and then every write, mode change, time set etc. was done as that user on the server side, and everything was pretty transparent to me. Recently, because I upgraded my machine, I was forced to stop using smbfs and change to cifs. It works well enough with windows machines, but when the host server is linux, I get nothing but grief. Herouth, FWIW, I see similar effects when the server is Windows. I have a different setup, I run VMware VMs on my work laptop, and I mount a share on the host (WinXP 64 bit) in Linux VM (CentOS 5.3). After initial hiccups I worked my way through the various security tabs in the share's Properties window, and disabled the host's firewall (after a nod from the company's sysadmin). After that what I need to do works just fine, but when I read your posting I tried to touch a couple of files and copy one over the other (had not had a need to do it before) - and I saw effects similar to what you describe (can't modify owner, can't modify time, etc.). I suspect the culprit maybe CIFS ACLs (I had added the user who mounts the share to the list and had given him full access) and/or their mapping to POSIX ACLs. I played a bit with getfacl/setfacl but got nowhere. Maybe some googling for CIFS ACLs will help. Sorry that I can't help you more, but maybe the fact that it is not Linux-server-specific will help the investigation... -- Oleg Goldshmidt | p...@goldshmidt.org ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: cifs replacing smbfs - how to set up?
Quoting guy keren c...@actcom.co.il: in the samba server file you have a 'workgroup' name - give this as the 'domain' to the cifs mount options. also, you can run the samba server on the linux machine in debug mode, re-connect the client, perform the operation and start reading the log... it's not trivial, but it's do-able. Thanks. I added the domain but it didn't help. The servers are not under my responsibility, unfortunately, so I can't dictate to the sysadmin to allocate time to look into this. I'll need to keep researching this until I can come up with specific parameters that should fix the problems. Do you have anything particular set as far as permissions or ACLs are concerned, on the server side? Might give me a clue. Herouth ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: cifs replacing smbfs - how to set up?
Quoting Oleg Goldshmidt p...@goldshmidt.org: FWIW, I see similar effects when the server is Windows. I have a different setup, I run VMware VMs on my work laptop, and I mount a share on the host (WinXP 64 bit) in Linux VM (CentOS 5.3). After initial hiccups I worked my way through the various security tabs in the share's Properties window, and disabled the host's firewall (after a nod from the company's sysadmin). After that what I need to do works just fine, but when I read your posting I tried to touch a couple of files and copy one over the other (had not had a need to do it before) - and I saw effects similar to what you describe (can't modify owner, can't modify time, etc.). Interesting, because my mount to the office file server (windows) actually works well, no problems copying or touching or anything. Could be a different version of windows. I suspect the culprit maybe CIFS ACLs (I had added the user who mounts the share to the list and had given him full access) and/or their mapping to POSIX ACLs. I played a bit with getfacl/setfacl but got nowhere. Maybe some googling for CIFS ACLs will help. I'll try that, thanks. Herouth ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
cifs replacing smbfs - how to set up?
Up until recently I used to have smbfs mounts to all the development and some of the production servers in my company. I used to mount as a particular user in the host machine, and then every write, mode change, time set etc. was done as that user on the server side, and everything was pretty transparent to me. Recently, because I upgraded my machine, I was forced to stop using smbfs and change to cifs. It works well enough with windows machines, but when the host server is linux, I get nothing but grief. All I need is for it to behave as it used to - allow me to access all the files as a particular user on the server side. Instead, I get all sorts of strange errors. For example, when I use cvs update in a project mounted with cifs, I get the following: P sql/9_insert 16_lookup.sql cvs update: cannot change mode of sql/9_insert/16_lookup.sql: Permission denied On other times I get errors such as cannot set time. Or when I try to copy a file over an existing file on the mount: cp foo.bar 16_lookup.sql I get the result: cp: cannot create regular file `16_lookup.sql': No such file or directory The only way to copy over a file is to rm it and then do the cp. Can anybody guide me on how I should change the server side, or the mount command on my fstab, to be able to work smoothly? I tried setting /proc/fs/cifs/LinuxExtensionsEnabled (on the client side) to 0, but it makes no difference. There is no domain controller - each of the servers is set up with its own set of users, and the user I use for mounting is not necessarily the same as my local one, though on some occasions it is. Here is an example line from my fstab if it helps: //lindev5/herouth /home/herouth/lindev5 cifs rw,user,noauto,username=herouth,password=REMOVED,ip=192.168.34.246,uid=herouth,gid=herouth,iocharset=utf8,file_mode=0644,dir_mode=0755,setuids TIA, Herouth ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: cifs replacing smbfs - how to set up?
when i switched from smbfs to cifs - i added the 'domain=' parameter, and used the name defined on the samba server - and had no similar problems. did you try this? also, i didn't use the file_mode, dir_mode or setuids optoins, that you are using. i would try to remove them and see if there's any change. finally - what distribution+version is your client? the same for the linux server? this might be relevant information. --guy Herouth Maoz wrote: Up until recently I used to have smbfs mounts to all the development and some of the production servers in my company. I used to mount as a particular user in the host machine, and then every write, mode change, time set etc. was done as that user on the server side, and everything was pretty transparent to me. Recently, because I upgraded my machine, I was forced to stop using smbfs and change to cifs. It works well enough with windows machines, but when the host server is linux, I get nothing but grief. All I need is for it to behave as it used to - allow me to access all the files as a particular user on the server side. Instead, I get all sorts of strange errors. For example, when I use cvs update in a project mounted with cifs, I get the following: P sql/9_insert 16_lookup.sql cvs update: cannot change mode of sql/9_insert/16_lookup.sql: Permission denied On other times I get errors such as cannot set time. Or when I try to copy a file over an existing file on the mount: cp foo.bar 16_lookup.sql I get the result: cp: cannot create regular file `16_lookup.sql': No such file or directory The only way to copy over a file is to rm it and then do the cp. Can anybody guide me on how I should change the server side, or the mount command on my fstab, to be able to work smoothly? I tried setting /proc/fs/cifs/LinuxExtensionsEnabled (on the client side) to 0, but it makes no difference. There is no domain controller - each of the servers is set up with its own set of users, and the user I use for mounting is not necessarily the same as my local one, though on some occasions it is. Here is an example line from my fstab if it helps: //lindev5/herouth /home/herouth/lindev5 cifs rw,user,noauto,username=herouth,password=REMOVED,ip=192.168.34.246,uid=herouth,gid=herouth,iocharset=utf8,file_mode=0644,dir_mode=0755,setuids TIA, Herouth ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: cifs replacing smbfs - how to set up?
On 15/06/2009, at 23:31, guy keren wrote: when i switched from smbfs to cifs - i added the 'domain=' parameter, and used the name defined on the samba server - and had no similar problems. did you try this? also, i didn't use the file_mode, dir_mode or setuids optoins, that you are using. i would try to remove them and see if there's any change. finally - what distribution+version is your client? the same for the linux server? this might be relevant information. My client distro is Mandriva 2009.0 - kernel 2.6.27.21-desktop-1mnb The server on that particular machine is Debian - kernel 2.6.18-6-686. All of our servers are debians, though not all are the same version. As for the domain argument - what should I set it to? I removed the file_mode and dir_mode parameters, but no help there - I still can't copy a file to an existing file. Removing them just makes the file permissions I get in ls be funny: Running ls -l on the client machine gives: total 8 -rwxrwSrwx 1 herouth herouth 121 2009-03-11 18:06 create_dev_pgsql.sql* -rwxrwSrwx 1 herouth herouth 125 2009-03-11 18:06 create_prod_pgsql.sql* drwxrwxrwx 1 herouth herouth 0 2009-03-17 15:51 CVS/ Running it on the server machine (connecting with ssh) gives: total 12 drwxr-xr-x 2 herouth herouth 4096 Mar 17 15:51 CVS -rw-r--r-- 1 herouth herouth 121 Mar 11 18:06 create_dev_pgsql.sql -rw-r--r-- 1 herouth herouth 125 Mar 11 18:06 create_prod_pgsql.sql Of course the permissions displayed on the client machine are ridiculous. Adding the file_mode and dir_mode parameters gives me normal permissions, which are similar most of the time to the real permissions. Further help would be appreciated. ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il