LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2004, 08:54 AM   #1
J.Q. Monkey
Member
 
Registered: Jan 2004
Location: Ho-Town, MI
Distribution: RH9
Posts: 34

Rep: Reputation: 15
Mounting a network drive so a normal user can rwx it


At work I wrote a script for my boss so he can mount a shared folder from a machine running xp. I set up sudo so he could use the mount command and the script does something like

sudo mount -t smbfs //CompName/Folder /mount_drive -o username=uname

And then it prompts him for the password on that computer. Works great right? Almost.

When it is mounted the mount_drive and all of the files are root owned and everyone else has read and execute permissions but no write permissions.

Is there anything that can be done to make that directory and those files be owned by someone other than root?
 
Old 02-19-2004, 09:22 AM   #2
carborundum
LQ Newbie
 
Registered: Feb 2004
Location: Iran
Distribution: Redhat
Posts: 2

Rep: Reputation: 0
use the -umask=xxx as one of the mount options where xxx is a three digit [0-7] number which indicates the permissions you desire to give to the users. for example, 000 gives full permision to owner, group and others.
 
Old 02-19-2004, 09:27 AM   #3
J.Q. Monkey
Member
 
Registered: Jan 2004
Location: Ho-Town, MI
Distribution: RH9
Posts: 34

Original Poster
Rep: Reputation: 15
ummmm....don't you mean 777 gives full permission to all. 000 would give no permission to everyone.

But I will try the umask thing
 
Old 02-19-2004, 09:59 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally posted by J.Q. Monkey
ummmm....don't you mean 777 gives full permission to all. 000 would give no permission to everyone.

But I will try the umask thing
no, it's a mask AGAINST the attributes. i.e. a 755 attribute set would equate to a *mask* of 022. so a umask of 777 would create a file with 000 rights
 
Old 02-20-2004, 07:17 AM   #5
carborundum
LQ Newbie
 
Registered: Feb 2004
Location: Iran
Distribution: Redhat
Posts: 2

Rep: Reputation: 0
That's surely the case ;-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can someone clarify somthing for me with mounting floppy through normal user nixerwannab Linux - Laptop and Netbook 4 01-24-2005 03:05 PM
mounting problems as normal user wisdom Linux - Networking 1 01-19-2005 10:26 AM
mounting windows partitions in writable mode for a normal user peevee Linux - Software 4 11-07-2004 04:08 PM
Mounting pendrive as a normal user (non-root) hbarbosa Linux - Hardware 1 11-03-2003 02:20 PM
Mounting ISO files as a normal user... Thymox Linux - General 3 02-16-2002 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration