top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How do I set permissions on a samba connection (using Linux)

0 votes
918 views

I have an existing system which contains a LAN connected disk drive. I have added a new computer on which I installed Ubuntu (this is my first linux experience). From the Ubuntu computer I can read the files on the samba connected drive but I can not write to those files. I have tried to change the permissions but can not locate where the drive is mounted. So my question ishow do I change the permissions?

posted Jun 24, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Samba/CIFS, is IMO the wrong tool. For starters its intended to talk to winders machines, and the last time I checked, was still unable to work with the perms diffs between windows and any *nix.

You want nfs, but you'll need to do some configuring. Its all in the man pages AFAIK.

answer Jun 24, 2013 by anonymous
Experimenting with this problem I have discovered that I can create and delete files using the Samba connection. I can not update the file after I created it or any other file that is already on the drive.

It seems to me that there is a problem with the permissions using the Samba connection. I would expect that if I can create or delete a file I should be able to update it.

The disk drive is a Buffalo 1tb disk LAN attached. I installed nfs and tried to mount the LAN disk with "-t nfs", the error message was "connection refused". I also tried to mount the LAN disk with "-t smbfs" and got the error message "mount: unknown filesystem type 'smbfs'" even though the man page for mount states that smbfs is a valid file system.
May you can use cifs instead of smbfs.
Only need the cifs-utils package. This package provides utilities for managing mounts of CIFS network file systems. A credentials file is recommended if you want toautomont a networkresource at boot.

For example:
# nano /etc/samba/mycred-file.conf
-- CONTENTS OF FILE --
username=your_username
password=your_password
domain=optional_domain_or_machine_name
-- END OF FILE --

# chmod 600 /etc/samba/mycred-credfile.conf

Then, you can use:
# mount -t cifs -o credentials=/etc/samba/mycred-file.conf,uid=1000
//server/shared /mount/point/

The uid=1000 option is for make the user with uid 1000 the owner of the
mounted resource (use one appropiate for you).
If you want automont of thenetworkresource when the system start, so add
a line to your fstab file:

# nano /etc/fstab
-- ADDSOMETHIG TO THIS AT THE END OF THE FILE --
//server/shared /mount/point cifs
credentials=/etc/samba/mycred-file.conf,auto,uid=1000,nounix,noserverino 0 0
-- END OF MODIFICTIONS --
Similar Questions
0 votes

When I connect my laptop to my samba network on my Ubuntu 12.04 box, and then shut down the lap top I get a system error on my desk top that is running Ubuntu.

A pop up box asks me if I am running a windows server. I tell it yes and it did work properly on Ubuntu 10.04.

Both computers can connect with each other, and I can transfer files back and forth from either one. There doesn't seem to be anything wrong. After I shut down the lap top is when I get the error.

Is there some way that I have to log the lap top out of the samba network before I turn of the lap top?

I have used Google and other searches to try and find out but have found nothing.

+2 votes

I'd like to change from Samba 3.0.33 to 3.6.6. Reason: WINDOWS 7 and PDC

Is something to consider when changing (config-Files or so on)? Have I to uninstall Samba 3.0.33 before or just run an update?

+3 votes

I just installed Samba on my Centos 6.4 computer. Smbstatus says my version is 3.6.9-151.el6-4.1.

My smb.conf file only has a [global] and [homes] section.

My configuration works, as expected, from a Win7 Virtual Box computer and a Win8 Virtual Box computer. I can see the share from the Windows file explorer and can map the share to a network drive. The Samba server is not virtual.

The problem is my other Win7 laptop which is running some sort of home edition of Win7. I did everything I could in control panel to enable file sharing but I still can't see the Samba share. I can ping the computer running Samba? I tried to launch "gpedit.msc" but this program was not there.

Do you think it would work if I upgraded Samba to the latest version 4.1? Should I consider upgrading to Win7 professional?

...