Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
System Permissions [Solved] and Autofs Errors [Unresolved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Sun Sep 28, 2014 5:25 am    Post subject: System Permissions [Solved] and Autofs Errors [Unresolved] Reply with quote

Hello to all the GenForumners. :)

I am stumped again. :(
I am trying to get my file system permission and sudo to work. Without making a directory in root, I can not make a new folder or even download anything off the internet. So I have been going through the forum and wiki trying to figure it out. I was fallowing the KDE setup guide and was trying to setup "Autofs" and I run the command
Code:
/etc/init.d/autofs start
and it gives me
Quote:
* Starting automounter ...
* No autofs support available in kernel [ !! ]
* ERROR: autofs failed to start
So I went into
Quote:
/usr/src/linux
and ran
Code:
make menuconfig
and made sure that I had
Quote:
File systems --->
<*> Kernel automounter version 4 support (also supports v3)
enabeled. So I saved the ".config" and exited the kernel editor. I mounted my boot and ran
Code:
grub2-mkconfig -o /boot/grub/grub.cfg
to make sure that it would update grub. However, I am missing a command some where, because after restarting my system I run
Code:
/etc/init.d/autofs start
I get the same error. So, how would I update and save the changes to the kernel so it will work in my system?
My second issue is getting permissions enabled. I just can't figure out which line to edit with
Code:
visudo
. I fallowed the hand boot in setting up my user account and adding it to the groups. I obviously did somthing wrong.
edit; I added my username under the root ALL=(ALL) ALL and sudo seems to be working, so, so far I figured that out.

Thanks again.


Last edited by Tefrem34 on Wed Oct 08, 2014 2:42 am; edited 4 times in total
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Sun Sep 28, 2014 6:56 am    Post subject: Reply with quote

the part that stands out to me, on a possible step you missed on the
Quote:
...So I saved the ".config" and exited the kernel editor. I mounted my boot and ran...

Is the part of rebuilding the kernel (so the kernel knows of it). Just enabling it in the .config just tells the compiler to enable that option for the kernel when it is next built.

So, what you may need to do (if you didn't already do this, and didn't say that) is run
Code:
make && make modules_install
make install

The first line will rebuild the kernel and any modules (with the new .config that you made doing the "make menuconfig"), and the second line will copy the kernel to your /boot directory. Do note, you still need to run
Code:
grub2-mkconfig -o /boot/grub/grub.cfg

afterwards, so grub knows of the new kernel (it should pick the new kernel as default, and will give a fallback option to use the older version, so does not remove your old kernel, just copies the new kernel over)
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Sun Sep 28, 2014 7:03 am    Post subject: Reply with quote

@ct85711, Thanks for the reply. :)
Code:
make && make modules_install
make install

That is what I missed! I wasn't sure if I could make changes without having to recompile the kernel so I didn't do this command.
Code:
grub2-mkconfig -o /boot/grub/grub.cfg
I got an error on this when I first was trying to update the kernel, I think that I just have to mount my /boot partition and then do the grub update.
Thanks again for the clarification.
Cheers!


Last edited by Tefrem34 on Mon Sep 29, 2014 6:07 am; edited 1 time in total
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Sun Sep 28, 2014 5:02 pm    Post subject: Reply with quote

You do need /boot mounted before you attempt to run the "make install", and the "grub2-mkconfig" commands. As while, you would still see a /boot directory even if you don't mount it, there wouldn't be anything in /boot (since it's stored in a different partition) till that partition is mounted.
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Sun Sep 28, 2014 7:42 pm    Post subject: Reply with quote

Thanks again for the tip!
Quote:
You do need /boot mounted before you attempt to run the "make install"
I would have blundered that as well.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21593

PostPosted: Sun Sep 28, 2014 8:22 pm    Post subject: Reply with quote

You may find it useful to change the permission on the underlying mountpoint to 0, so that if the filesystem is not mounted there, the permissions are obviously wrong. For example:
Code:
umount /boot
chmod 0 /boot
ls -ld /boot
mount /boot
ls -ld /boot
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Sun Sep 28, 2014 8:29 pm    Post subject: Reply with quote

Code:
/etc/init.d/autofs start
 * Starting automounter ...
/usr/sbin/automount: test mount forbidden or incorrect kernel protocol version, kernel protocol version 5.00 or above required.
 * start-stop-daemon: failed to start `/usr/sbin/automount'                                                                           [ !! ]
 * ERROR: autofs failed to start

I didn't post this message after running
Code:
make install
Quote:
depmod: ERROR: Module 'hci_vhci' has devname (vhci) but lacks major and minor information. Ignoring.

I got this error now. So do I need to edit something else in that kernel selection?

@Hu, thanks for the info.
I am unsure what you are telling me. Should I run these commands before I try to update the kernel, or just in general for my system permitions?
I am going to run it just the same, I just would like to understand it.
I just ran it and I think I get what it did, but I still would like clarification.
Thanks.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21593

PostPosted: Sun Sep 28, 2014 10:47 pm    Post subject: Reply with quote

On the root filesystem, you have a directory named boot. It should contain no files. When you mount your boot filesystem, it becomes accessible at /boot and the corresponding directory on the root filesystem becomes hidden. By setting the mode on the root filesystem's boot directory to 0, you make it obvious when the boot filesystem is not mounted.
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Mon Sep 29, 2014 6:02 am    Post subject: Reply with quote

Thank you for the clarification.
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Mon Sep 29, 2014 6:14 am    Post subject: Reply with quote

This is the version of autofs that I have installed
Quote:
5.0.7-r4(05:34:35 PM 09/27/2014)(ldap -dmalloc -hesiod -libtirpc -mount-locking -sasl)
When I ran
Code:
eix autofs
it is the lowest version.
So I take it that
Quote:
test mount forbidden
is the culprate. But I still can not find out how to fix permitions for writing to my home directory.
:?

I found this line from http://www.linuxquestions.org/questions/linux-networking-3/automount-test-mount-forbidden-or-incorrect-kernel-protocol-version-in-rhel-5-a-849965/ and the last comment was
Quote:
One of the reason for this error can be, /tmp directory is not present or it's permission/ownership is wrong.
That's fine and all but I have not idea what I need to do in order to try this. Could someone give me a tip?
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Tue Sep 30, 2014 2:27 am    Post subject: Reply with quote

I don't think that I mentioned that my /var and /home are on a different hard drive than my root. Could this be why I do not have permissions set for my home and user account, and why I can't write to my home folder or download anything?

Here is my /etc/fstab file
Code:
# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda3               /boot           ext2            noauto,noatime           0 2
/dev/sda5               /               ext4            defaults,noatime,discard 0 1
/dev/sdc5               /var            ext4            defaults,noatime         0 0
/dev/sdc6               /home           ext4            defaults,noatime         0 0
#/dev/SWAP              none            swap            sw              0 0
/dev/sr0                /mnt/cdrom      auto            noauto,ro                0 0

would this affect mounting?

Something else that I found weird was some of my music folders on my storage HD are unaccessable. There is a strange character in the title and when I try to open it I get this error
Quote:
The file or folder /run/media/rbear/Storage/Music/Rhapsody of Fire - Discograf�a does not exist.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21593

PostPosted: Tue Sep 30, 2014 3:31 am    Post subject: Reply with quote

This thread is getting confusing. From the OP, we now have an automounter problem (but no indication why an automounter is being used), some ambiguous write access problems, and a weirdly named CD rip.

OP: please pick one problem, explain in detail why it is a problem, what its symptoms are, and what you have tried to fix it. I suggest starting with the write access problems, since those seem to be the most serious. Tell us which directories you are unable to write, what user you used to try it, how the write fails, and why you think writing should work there.
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Tue Sep 30, 2014 3:59 pm    Post subject: Reply with quote

Well I figured out how to fix the permissions and download now.
I had to go
Code:
kdesu dolphin
and change the permissions for the
Code:
/usr/www
folder and did the same for my user home directory.

However,
Code:
/etc/init.d/autofs start
still gives me the same error. I even started x in root and tried it; same story.
So the search is still on.
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Wed Oct 01, 2014 7:21 am    Post subject: Reply with quote

@Hu, sorry for the lack of cohesive dialog. I also didn't see your post until after I made the last one.
Quote:
weirdly named CD rip
I don't know where this came from? :?

At first, there was a multitude of problems that effected each other which I thought was all one issue. For one, I couldn't write to any of my home directory, no downloading or creating folders with out being root (or starting x as root). I assumed that the drives were not mounting, thus not allowing me to write to any of my files. The reason I thought this, was because I could not properly setup Autofs, which I still cannot. Furthermore, I could not find an answer to why I couldn't download anything from the internet or create a new folder as a regular user. So I was going back and forth because I didn't know what was causing the problems.
Now that I was able to find a solution to the user file permissions, I am still stinted by the autofs and some files in media drive not being accessible (even as root). I have a dedicated storage drive that I use to hold my media and current projects that I need to be auto mounted so that I can work seamlessly with my applications and multiple OS's. The issue that I am having, besides having to put in my password to access it, is that certain files give me an error saying that there is no access, or no such folder,
Quote:
The file or folder /run/media/rbear/Storage/Music/Rhapsody of Fire - Discograf�a does not exist.
when I know that it exists and has files in it. It is not all the folders but just a few. With all the distros that I have used, I have never experienced this issue before.
Ultimately, I did not know what all I needed to ask for in order to fix the issues of Autofs and strange file errors on a, ntfs formatted, media hard drive. I was just throwing stuff out there in hope that someone might have an idea what might be the culprit.
I hope that made sense.
Thanks again.
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Thu Oct 02, 2014 4:16 pm    Post subject: Reply with quote

Okay this officially sucks! :(

I have been trying to make a backup of my xorg configuration file and save it to my backup drives, external and internal, and I can not copy it to either. I even tried to do it as root. I have no permission to write to any other drive except my root and home folders. This is really frustrating. :x
I still can't find an article that offers a solution to this. So if someone can point me in the right direction, I would greatly appreciate it.

Thanks
Back to top
View user's profile Send private message
Tefrem34
Guru
Guru


Joined: 14 Sep 2014
Posts: 400
Location: USA, California

PostPosted: Wed Oct 08, 2014 3:04 am    Post subject: Reply with quote

Finally, I found a solution to not having any read and write permissions for my Storage device. :lol:

First, I installed nftfs-3g along with fuse. I added fuse to my "rc-update default," I do not know whether or not it helped, and then proceeded to add this line to my /etc/fstab file
Code:
# My Storage mount point
/dev/sde1               /media/Storage  ntfs-3g         defaults,noatime        0 0

I made sure that the device was unmounted and ran
Code:
sudo mount -a

Then, I checked the files and all the folders in my Storage device, which now, no longer has the folder errors and I can write and save to those folders again. :D I haven't rebooted yet to make sure that it will mount on boot, but if it doesn't then I have some more reading/tweaking to do.
This video and articles were instrumental in solving the write permissions
use ntfs-3g and permissions http://askubuntu.com/questions/90339/how-do-i-set-read-write-permissions-my-hard-drives and http://www.linuxquestions.org/questions/gentoo-87/gentoo-can%27t-write-to-ntfs-volume-658388/
edit fstab for automounting https://www.youtube.com/watch?v=BhktLDhK5p8

I still get an error with the autofs, but since I have my device back it doesn't matter to me (until I run into another problem with mounting).

Thanks again for the help. :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum