LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-24-2008, 02:02 AM   #1
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Rep: Reputation: 59
no write access for users, only root.


I had a similar problem a while back.
http://www.linuxquestions.org/questi...ssions-573012/

Whenever I boot my machine and go into root i have full permissions. Whenever I log in as a user however I cannot get write mode working. Logging into root will let me save files as root.

I tried swtting up my user as a sudoer. This was actually a challenge as I have never used vi and or visudo, but i conquered that issue. Short story long, sudo works but again no rwx for user.

So what I am guessing is take the solution from the thread I posted and insert it into the appropriate startup script.

Is this correct or is there an easier solution I skimmed over in slackbook?
 
Old 11-24-2008, 02:34 AM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What directory are you in?

If it's your home, what are permissions of the user's home directory (ie /home/username) and ownership?

What's the file system?

Is this a mounted partition (ie are you within a mountpoint below /)?
 
Old 11-24-2008, 02:57 AM   #3
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 252

Rep: Reputation: 120Reputation: 120
If I understand correctly, you have a VFAT partition and you wish to have regular users provided with write access to it. You have found that the following command sets things up properly and therefore wish to have this "autoconfigured" at bootup.
Quote:
mount -t vfat /dev/sda1 /media/hdd -o rw,uid=0,gid=104,umask=000
The "proper" way to accomplish this at bootup is to edit the /etc/fstab file and add the following line:
Quote:
/dev/sda1 /media/hdd vfat rw,uid=0,gid=104,umask=000 1 2
 
Old 11-24-2008, 02:59 AM   #4
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Original Poster
Rep: Reputation: 59
Ah, it is my storage drive I am talking about, although I have 3 drives that mount at bootup to the /drives/ directory I created specificly for that durning instalation.
Code:
jpo@slackin:/drives$ ls -l
total 12
drwxr-xr-x 2 root root 4096 2008-11-19 22:30 flash/
drwxr-xr-x 1 root root 4096 2008-11-19 15:29 storage/
drwxr-xr-x 1 root root 4096 2008-11-23 16:44 winblows/
jpo@slackin:/drives$ chmod storage +w
So this doesent do anything...

Code:
jpo@slackin:/drives$ sudo chmod +w storage
Password:
jpo@slackin:/drives$ ls -l
total 12
drwxr-xr-x 2 root root 4096 2008-11-19 22:30 flash/
drwxr-xr-x 1 root root 4096 2008-11-19 15:29 storage/
drwxr-xr-x 1 root root 4096 2008-11-23 16:44 winblows/
Neither does this...

Code:
jpo@slackin:/drives$ sudo chmod 777 storage
jpo@slackin:/drives$ ls -l
total 12
drwxr-xr-x 2 root root 4096 2008-11-19 22:30 flash/
drwxr-xr-x 1 root root 4096 2008-11-19 15:29 storage/
drwxr-xr-x 1 root root 4096 2008-11-23 16:44 winblows/
But unmounting and remounting with proper permissions works great.

Code:
jpo@slackin:/drives$ sudo umount /dev/hdb1...
jpo@slackin:/drives$ sudo  mount -t ntfs /dev/hdb1 /drives/storage -o rw,uid=0,gid=104,umask=002
jpo@slackin:/drives$ ls -l
total 12
drwxr-xr-x 2 root root 4096 2008-11-19 22:30 flash/
drwxrwxr-x 1 root  104 4096 2008-11-19 15:29 storage/
drwxr-xr-x 1 root root 4096 2008-11-23 16:44 winblows/
So I have no problem re-mounting the drive(s) with proper permissions and getting the correct access mode. I don't quite know where in the bootup process the script is that mounts those drives, I just want to alter it slightly so I dont have to do this every time i log in.
 
Old 11-24-2008, 03:03 AM   #5
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Should be in /etc/fstab shouldn't it?
 
Old 11-24-2008, 03:34 AM   #6
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by saulgoode View Post
If I understand correctly, you have a VFAT partition and you wish to have regular users provided with write access to it. You have found that the following command sets things up properly and therefore wish to have this "autoconfigured" at bootup.


The "proper" way to accomplish this at bootup is to edit the /etc/fstab file and add the following line:
It was in that example (fat32). Its NTFS in this one. Looks like we were replying at the same time.

one more question, how do I find or assign group ID to each user. In the example from the previous thread i was running fedora and gid 104 worked fine. It does not apply here i dont think as i cannot save, however the folder is green which means it worked, now i just have to make it work for the correct user.

Once I figure that out I can edit those lines into my /etc/fstab. I completely forgot about that file because i was reading slackbook and it mentions several scripts that it loads and this one
Quote:
rc.local
Contains any specific startup commands for your system. This is empty after a fresh install, as it is reserved for local administrators. This script is run after all other initialization has taken place.
looked like it would work, but didnt have the command in it. I didnt want to tell my drives to mount here if something that was loading before it already told them to mount a certain way.

**
reading is fundamental. its in /etc/passwd
shows me my gid and uid so i can use either.**

Last edited by linuxpokernut; 11-24-2008 at 03:40 AM.
 
Old 11-24-2008, 04:06 AM   #7
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Original Poster
Rep: Reputation: 59
Code:
jpo@slackin:~$ sudo umount /dev/hdb1
Password:
jpo@slackin:~$ sudo  mount -t ntfs /dev/hdb1 /drives/storage -o rw,uid=500,umask=000
jpo@slackin:~$ ls -l /drives
total 12
drwxr-xr-x 2 root root 4096 2008-11-19 22:30 flash/
drwxrwxrwx 1 jpo  root 4096 2008-11-19 15:29 storage/
drwxr-xr-x 1 root root 4096 2008-11-23 16:44 winblows/
Gets me in there but when I go to save a file, access denied. I am stumped.

*Problem solved, thank you*
If anyone wants to explain what the 2 numbers after the umask in the fstab file signify however i would like to understand better. Thank you for the help.

/dev/sda1 /media/hdd vfat rw,uid=0,gid=104,umask=000 1 2

Last edited by linuxpokernut; 11-24-2008 at 04:50 AM.
 
Old 11-24-2008, 04:47 AM   #8
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
[deleted]

Last edited by billymayday; 11-24-2008 at 07:38 PM.
 
Old 11-24-2008, 05:06 AM   #9
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 252

Rep: Reputation: 120Reputation: 120
The fifth field of an fstab entry indicates how often the partition should be backed up (1=every day, 2=every other day, etc). I believe it is ignored in modern GNU/Linux systems but Patrick seems to put a "1" there and I trust his judgment.

The sixth field indicates the order in which 'fsck' is to be executed during bootup. The root partition should be checked first and so the sixth field for its entry should "1". The order of other partitions should not matter and their entries should contain a "2" (unless 'fsck' is never to be run for the partition, in which case the sixth field should contain "0").

Perhaps for a VFAT partition, the sixth field should be set to "0" -- I don't use Microsoft partitions so I'm not sure.
 
Old 11-24-2008, 05:39 AM   #10
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Original Poster
Rep: Reputation: 59
thanks. it really helps to understand what i'm doing.
 
Old 11-24-2008, 04:15 PM   #11
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,925

Rep: Reputation: Disabled
http://slackwiki.org/Windows_Partitions
 
Old 11-24-2008, 05:22 PM   #12
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
If you unmount both of those partitions, what does ls -l /drives show?
 
Old 11-24-2008, 07:26 PM   #13
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by billymayday View Post
If you unmount both of those partitions, what does ls -l /drives show?
Code:
jpo@slackin:~$ ls -l /drives
total 12
drwxr-xr-x 2 root root 4096 2008-11-19 22:30 flash/
drwxr-xr-x 2 root root 4096 2008-11-19 22:29 storage/
drwxr-xr-x 2 root root 4096 2008-11-19 22:29 winblows/
 
Old 11-24-2008, 07:41 PM   #14
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Can you try

mount -t ntfs /dev/hdb1 /drives/storage -o rw,uid=your_uid,gig=your_gid

and

mount -t ntfs /dev/hdb1 /drives/storage -o rw,umask=000
 
Old 11-24-2008, 09:55 PM   #15
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by billymayday View Post
Can you try

mount -t ntfs /dev/hdb1 /drives/storage -o rw,uid=your_uid,gig=your_gid

and

mount -t ntfs /dev/hdb1 /drives/storage -o rw,umask=000
Yes, I tried both of those before I edited my fstab, neither method worked, once i did that (edited fstab) everything works fine. I was just asking about the 5th and 6th fields as I wanted to know what i was doing, not just cut/paste/forget.
 
  


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
pmount problem: no write permissions for non root users akirashinigami Linux - Laptop and Netbook 4 07-13-2008 07:24 PM
Trouble giving write access to non root users to the hard disk (FC-5) mystic_durle12 Linux - Newbie 6 06-03-2008 07:44 AM
enabling read write access for non root users austinium Linux - Newbie 7 05-01-2008 08:05 AM
Allow two users write access, but not delete jimieee Linux - General 4 03-29-2005 09:37 AM
Users couldnt get Write permission from root. novkhan Red Hat 8 06-25-2004 02:53 PM


All times are GMT -5. The time now is 08:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration