?
Solved

How do I mount a samba share and have it use the same permissions as the original mount point?

Posted on 2008-10-15
6
Medium Priority
?
2,677 Views
Last Modified: 2013-12-09
I set up file share between my wife's vista box and my ubuntu box.  The only way I could get it to work was to use the mount command and mount her share on my machine, using a blank mount point.  I set up the mount point as rwxrwxrwx  

The only way I can get the mount command to work is as root.  It mounts correctly but the permission are drwxr-xr-x.  That means I can only write to that directory as root.  Bumer.

I tried "sudo mount -t smbfs -o username=ken -o mode=777  //172.16.1.34/KenShared /home/ken/vista", but it keeps mounting it as 755 (rwxr-xr-x).

Is there anyway to tell samba to mount it using the original mount point permissions or force it to mount as 777?

Thanks for your help

0
Comment
Question by:KenSpeedie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 

Author Comment

by:KenSpeedie
ID: 22726966
Tanks for you help.
0
 
LVL 23

Accepted Solution

by:
Mysidia earned 1000 total points
ID: 22727214
Edit  /etc/fstab

//172.16.1.34/KenShared  /home/ken/vista  cifs   username=ken,user,noperm,noauto,dir_mode=777,file_mode=777    0 0

(This is all one line  with spaces between  "cifs"  filesystem type
and the filesystem options)


then use:
mount /home/ken/vista
0
 

Author Comment

by:KenSpeedie
ID: 22733579
Out of curiosity I ran your solution from the command line and got -

WARNING: 'dir_mode' not expressed in octal.
WARNING: 'file_mode' not expressed in octal

It mounted peoperly but with dr----x--t permissions.

I edited fstab, rebooted, and ran "mount /home/ken/vista"  and got the same thing.

Obviously it misread the mode settings.  How do I express the modes in octal?

Also it will only work as root.  Mounting as user gives me permissions error.  After it is mounted, owner and user get changed to root:root.  That will not be a problem if we can get universl permissions or at least so that I can have rw permissions.













































0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 68

Expert Comment

by:woolmilkporc
ID: 22739579
Please try 0777!
0
 
LVL 23

Expert Comment

by:Mysidia
ID: 22750194
Oh.. sorry about that.  

Octal file permissions are indicated by a leading 0, this is just like the chmod command:

//172.16.1.34/KenShared  /home/ken/vista  cifs   username=ken,user,noperm,noauto,dir_mode=0777,file_mode=0777    0 0

0
 

Author Closing Comment

by:KenSpeedie
ID: 31506556
Solution was corrrect except I did not know how to format permission codes in octal.  Mysidia told me how to do that.

Thanks for the help.
0

Featured Post

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Outsource Your Fax Infrastructure to the Cloud (And come out looking like an IT Hero!) Relative to the many demands on today’s IT teams, spending capital, time and resources to maintain physical fax servers and infrastructure is not a high priority.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question