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
2,626 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 250 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Cloud file services can fill many different roles for your business. Often, the use of cloud file services begins with employees using consumer products, like Dropbox, to share files with customers and each other. While sync-and-share can be an effe…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

733 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