LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-31-2013, 10:55 PM   #1
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Rep: Reputation: 47
Accessing ext4 partition with writable access without fstab entry


I have Slackware14 full install (KDE), updated and otherwise working well. I recently tried to access an "ext4" formatted data partition by clicking on it in the left side partition list of Dolphin file manager. Dolphin asked me for password and then opened the partition. However, the partition is opening in read-only mode and I cannot create or edit any files there. How can I solve this problem without adding any entry to fstab (i.e. how to configure so that it mounts with writable access if clicked in file manager)? Thanks for your help.
 
Old 08-01-2013, 02:05 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
can you post your /etc/fstab ?
 
Old 08-01-2013, 02:57 AM   #3
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
Quote:
can you post your /etc/fstab ?
Here it is:
Code:
/dev/sda3        /                ext4        defaults         1   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 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
tmpfs            /dev/shm         tmpfs       defaults         0   0
As I mentioned above, I want to change auto-mount settings without making any change to fstab file.
 
Old 08-01-2013, 05:16 AM   #4
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
what partition do you want to access? your fstab only list root partition
 
Old 08-01-2013, 05:31 AM   #5
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
Quote:
Originally Posted by willysr View Post
what partition do you want to access? your fstab only list root partition
I have clarified in my earlier posts that I am mounting the partition by clicking on it in the file manager Dolphin when I need to access it. I do not want to make any fstab entry since the slackware14 installation is on an external disk which I may move to another computer with different hard disk structure.
 
Old 08-01-2013, 05:52 AM   #6
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 619

Rep: Reputation: 299Reputation: 299Reputation: 299
I would add to fstab this line :

/dev/sdb1 /mnt/myusbdisk ext4 defaults,noauto,user 0 0

noauto says don't mount at boot
user says a user can mount it

You might need some other options, but that looks the basis to it.
 
Old 08-01-2013, 08:59 AM   #7
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
Is there any way I can solve this without any fstab entry?
 
Old 08-01-2013, 09:15 AM   #8
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 288

Rep: Reputation: 155Reputation: 155
I believe you can do that by editing the 'filesystem-mount-system-internal' section of /usr/share/polkit-1/actions/org.freedesktop.udisks.policy.
 
Old 08-01-2013, 12:24 PM   #9
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
Following parts of file /usr/share/polkit-1/actions/org.freedesktop.udisks.policy deal with 'mount':
Code:
<action id="org.freedesktop.udisks.filesystem-mount">
    <description>Mount a device</description>
    <description xml:lang="da">Montér en enhed</description>
    <message>Authentication is required to mount the device</message>
    <message xml:lang="da">Autorisering er påkrævet for at montere et fil system</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

<action id="org.freedesktop.udisks.filesystem-mount-system-internal">
    <description>Mount a system-internal device</description>
    <description xml:lang="da">Montér en intern enhed</description>
    <message>Authentication is required to mount the device</message>
    <message xml:lang="da">Autorisering er påkrævet for at montere et fil system</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>
In the filesystem-mount-system-internal part, should I change both 'no' to 'yes'?
 
Old 08-01-2013, 03:04 PM   #10
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 619

Rep: Reputation: 299Reputation: 299Reputation: 299
When I look at the hack required to make a disk mountable by a user and I see all that XML junk, somehow I feel Linux lost the plot. I'd still go with the fstab method as it's far simpler and will survive an upgrade. When you upgrade to the next version of Slack are you going to remember this obscure method and ridiculous file path and name?
 
1 members found this post helpful.
Old 08-01-2013, 08:05 PM   #11
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
I have a dirty solution: Open the GTK open file dialog, choose the unmounted filesystem from the left, then it's mounted read-write.

While this might be welcome by the OP, I am thoroughly horrified by how simple it is for an unprivileged user to do arbitrary mounts.
 
Old 08-01-2013, 10:37 PM   #12
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
I copied /usr/share/polkit-1/actions/org.freedesktop.udisks.policy and udisks2.policy files from another installed distribution (where mounting was as needed) and it worked well. I know this is not the best solution but it works.
 
  


Reply



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
Partition disappears after removing FSTAB entry. Prabhu.Are Ubuntu 3 12-31-2012 07:28 AM
what I type for given entry in /etc/fstab for mounting a partition dipanjan Linux - General 11 07-28-2008 09:22 AM
Making an entry in fstab for new xfs partition Cinematography Linux - Hardware 2 09-16-2007 09:39 PM
fstab entry for windows partition stratotak Debian 2 02-15-2007 06:09 AM
FSTAB entry for normal user to access windows partition rmanocha Linux - Software 4 01-29-2004 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:47 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