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,597 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
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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mcrypt_create_iv() is deprecated 4 167
Help on running oracle SQL script in linux 3 50
winscp 000webhost.com 6 54
Why  my code (program) build with old compiler? 11 47
The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

803 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