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,563 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
  • 3
  • 2
6 Comments
 

Author Comment

by:KenSpeedie
Comment Utility
Tanks for you help.
0
 
LVL 23

Accepted Solution

by:
Mysidia earned 250 total points
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
Please try 0777!
0
 
LVL 23

Expert Comment

by:Mysidia
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
With the withdrawal of support for Windows Server 2003 this summer, many clients face the issue of moving away from their 2003 installs. There are a few options out there that many people/companies are selling. But the clients I have, haven't wanted…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now