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 09-29-2004, 08:39 PM   #1
Alinuxnoob
Member
 
Registered: Feb 2002
Location: Van city
Distribution: Ubuntu
Posts: 204

Rep: Reputation: 30
Permission denied using a user? SLACKER


Ok I don't know what group this user is in?

I been using linux for a while and I still don't know how permissions work


OK first I want to know what command do I type in to find out what group does the user belong to blah blah

and if I change etc/fstab do i need to restart the services or does it just restart already after you save it?

Ok now my real problem..... OK my last install of slackware I just used root for everything... I mean everything... Installed programs under root, just only had root as the user... ok not for everything... tried to step it up

You know adduser blah blah

and then come across Permission denied... OK OK I'll search and search try and attempt different soultions same issue and still get PERMISSION DENIED.... Ok so whatever why not just run root I have nothing on my PC that a hack can make use of.

SO I got bored @ work and just sitting here having nothing to do and realize Oh wait... I'm such a noob I don't even have a swap space...

SO I search linuquestion.org and come up with the same issues that people where having and again I do the only search for the same issue and search and find the answer I was looking for

To Create a swap space = mkswap /dev/hda2 OMG that was my /
Ok Post my problem and I'm SOFL... Ok

@ least now I remmeber 1 command that I don't need to search for WHOOO hooo...
SO I did a clean install and Stepping it up to make my life better and sitting there without looking @ the man pages waiting till slack is up, getting back my bittorent running as soon as possible cause I lost all what I was downloading .

HAAHHHAHHA
IM @ work again so back to helping me out
Here is my /etc/fstab

/dev/hda2 / ext2 defaults 1 1
/dev/hda5 /swap ext2 defaults 1 2
/dev/hda1 /fatc ntfs noauto,user,ro,umask=0222 0 0
/dev/hdb1 /fatd vfat auto, user,umask=0277 1 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

did some chom badboy:users /dev/hdb1
so

I don't want to add badbay as a group root or what ever its called....

just wanna be able to have this user to be able to access the drives and be able to mount and everything else I can do the old su


hope you guys have fun reading this cause I'm so bored doing help desk support.
 
Old 09-29-2004, 08:48 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
You DON'T want the user to have access to the
raw-device. To give him permission to mount/unmount
the windows partitions just make the "owner" in fstab
"user" and for user to be able to read and write make
the umask=000 ...


Cheers,
Tink


P.S.: Your post could be one of the most incoherent ones
I've come across on LQ, congratulations. Try to think of
this board as something that helps you and others with
technical problems, not as your blog.
 
Old 09-29-2004, 10:04 PM   #3
Alinuxnoob
Member
 
Registered: Feb 2002
Location: Van city
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
Ok what do you mean "just make the "owner" in fstab
"user" and for user to be able to read and write make
the umask=000 ... "


I don't understand? what you mean or how to do it...../
 
Old 09-30-2004, 06:03 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
First of all, do you want your /dev/hdb1 fat32 drive to be read-only in linux? You can change the umask to 0177. Because the fat32 (vfat) and NTFS file systems don't save the Linux file permissions and attributes, information that you would normally set using the chmod or chown commands on the mounted partition, is contained in the mount entry instead. You can set the owner and group of these file systems with the options uid= and gid=. You can use either the user/group name or the UID/GID numbers. So the option uid=badboy will make the user 'badboy' the owner of the partition. You can also create a new group, let's call it 'fatds' for the sake of example. Then the gid=fatds, with a umask of 007 would enable you to control which users can access this drive, by adding permitted users as members of the 'fatds' group.
 
Old 09-30-2004, 07:35 PM   #5
Alinuxnoob
Member
 
Registered: Feb 2002
Location: Van city
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
Code:
/dev/hda2        /                ext2        defaults         1   1
/dev/hda5        /swap            ext2        defaults         1   2
/dev/hda1        /fatc            ntfs        noauto,user,ro,umask=000 0 0
/dev/hdb1        /fatd            vfat        auto, user,umask=000   1   0
/dev/cdrom       /mnt/cdrom       iso9660     noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
OK I changed that but still gets permission denied when login as user "badboy"


and I want /dev/hda1 fat32 to be Read, Write
and /dev/hdb1 NTFS to be read only

OK SO in fstab i add uid=badboy

because I don't recall adding this user to any groups
and I don't really understand what to do....
 
Old 10-04-2004, 05:48 PM   #6
Alinuxnoob
Member
 
Registered: Feb 2002
Location: Van city
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
Smile Figure it out!!!

Ok I figure it out and why I get that error code


THE REASON why is cause when I boot into Linux all my stuff gets mounted as root


----

SO What I did was add this

Code:
defaults,auto,user,umask=000,rw 0 0

basically I have to umount /fatc, fatd, any devices as root


mount as user blah

WORKS GREAT
 
Old 10-05-2004, 03:30 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you change a line in your fstab file to:
Code:
/dev/hdb1        /fatd            vfat        auto, uid=badboyuser,umask=000   1   0
you should be able to use the partition without having to unmount and remount it.

About the gid= option; if you create a 'fatdusers' group, and add 'gid=fatdusers', then you can add users to this group to allow more than one user to access this drive.

I think that the 'user' option may allow any user to remount the drive. This may not be what you want.
 
Old 10-05-2004, 11:20 AM   #8
Cort
LQ Newbie
 
Registered: Sep 2004
Location: Missouri
Distribution: Red Hat Enterprise 9.0
Posts: 11

Rep: Reputation: 0
Answer to your First Question.

Look at the "/etc/passwd" file it will show what group the user belongs to.

Another file is also "/etc/group" it will show what groups there are and who belongs to them.

I hope this helps you!
 
  


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
Permission denied for root user shujja Linux - Newbie 9 10-28-2014 08:32 PM
whatever a non-root user does, he gets 'permission denied'. boazg Linux - Software 2 08-05-2005 08:17 AM
User executing script: bad interpreter: Permission denied stefaandk Linux - Newbie 7 06-27-2005 09:53 AM
winbind samba user vs. group permission denied prob pauljtester Linux - Software 1 09-30-2004 09:32 AM
Problem when logging as a user (permission denied) Dartelin Linux - Newbie 3 05-03-2004 12:15 PM

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

All times are GMT -5. The time now is 04:36 AM.

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