Shared folders and noexec permissions

  • I have 2 HDDs on my system, a small 250GB HDD which holds the /, /home and swap partitions, and a larger 3TB HDD for data storage. I don't need exec permissions in the 3TB HDD but, I need on the /home partition of the smaller HDD, and I'll tell you why...


    By default, the SABnzbd, SickBeard and CouchPotato plugins create a home folder inside /home and store the settings and incomplete downloads (for SABnzbd) inside them (i.e. /home/sabnzbd/.sabnzbd, /home/sickbeard/.sickbeard and /home/couchpotato/.couchpotato). For that purpose, my /home partition is the largest one in the 250GB HDD. As for Transmission, it doesn't create anything on that folder. But, for consistency (I like to keep things nice and tidy and very consistent with each other) I created the folder /home/transmission/.transmission to store my incomplete downloads. For this to work, my /home partition needs to be mounted inside OMV, so that I can create a shared folder for the transmission root folder and use that in the BitTorrent service section to select my incomplete folder location (I'm forced to use a shared folder by the plugin).


    But mounting the /home partition inside OMV presents a problem, it mounts with noexec permissions because it's assuming this is a data partition and you don't need exec permissions on data folders (I can agree with that). But this is not a data a partition, this is my home partition. One thing that I do inside this folder is pull the latest XBMC (now Kodi) version and compile it from source. I can't do that if I don't have exec permissions on this partition.


    You can understand my dilemma here... I think that OMV needs to address possible things like this, that not every mounted partition is a data partition, maybe have an option to specify that during mount and set the noexec bit accordingly, or better yet, have an option to override the default mounting options? I know that OMV is supposed to be easy for the average joe to use, but it should also have more advanced options for those that need it and now what they are doing. Here's an idea, introduce a "advanced" option (which can only be toggled directly in the filesystem no the the UI) which will display advanced options in the UI, like the one I just described. Just a thought...


    However, my problems don't end here... Because I have my /home partition mounted by OMV, this is now mounted at /media/<uuid> and I no longer have a /home folder in the file system. This is a common folder to have and it can com in handy instead of cd'ing to /media/<uuid>. To work around that problem I've created a /home symlink pointing to the proper /media folder. But now I can no longer use the tab key to autocomplete to the home folder because it no longer adds the forward slash at the end (it's a symlink not a folder). Just a slight annoyance...


    In a nutshell, I think that OMV should reconsider how it handles mounted partitions that are not data partitions, which options it uses to mount those and where it mounts them. Like I said, these could all be advanced settings for an advanced used which are only visible by toggling an advanced option somewhere in the filesystem as a matter of protection against newbies.


    If there's anyway I could have solved my problems in another way, please tell me, I'll be glad to learn it... Just don't tell me to put the transmission folder same place else, like I said, my /home folder is the biggest partition on the 250GB and it's where all my incomplete downloads go, all others only have the space required for their purpose.

    • Offizieller Beitrag

    Xará, you're making yourself too much of a problem. First things first:
    1) The default behaviour from the OMV UI won't change regarding the mount's, there will be noexec no matter what.


    2) regarding the soft links, and your trailing slash, and your autocomplete, i believe you can solve that using a "mount - o bind" instead of "ln -s", but I've found a decent fix for that here after 30 seconds in google. Even I didn't know that! so thank you I guess!


    3) Why bother with transmission incomplete folders?, your moving data across two disk? why?


    4) I am under the impression that your compilations problems might be solved using a "mount --bind", but i am not sure. Why use the media folders? I build Openelec usually in /opt or /root. Is not like they use too much space against 250GB.


    Feel free to ask any other question, but I remind you that core changes to OMV go through volker's decision.

  • 1) Just to be clear, I'm not ashing to change the default behavior, I'm asking to add options for advanced users to pick what they want, the defaults can remain what they are now. Either way, it's just a suggestion...


    2) Neat. I think I'll use both tricks :D


    3) Because I have SickBeard/CouchPotato polling every few minutes for completed downloads to post-process them and I don't want that on incomplete downloads. They need to be in different folders to avoid any kind of issues. I'm moving data across two disks mainly for two reasons: 1) Like I said before, I like to keep things nice and tidy and I want my data disk to be just that, a data storage disk. For all intents and purposes, an incomplete download is a "temporary file" and I don't want temporary files on my data storage disk, I want "final" usable files. 2) Downloading from Usenet/Torrents requires a lot writing to the disk during download and lots of files will need to be checked, repaired and extracted. I don't want all that post-processing to happen on my data storage drive. My data disk is a WD Red with a XFS filesystem and the other one is a WD Blue with a EXT3 filesystem. When I first assembled this system, I remember reading a lot about theses disks, filesystems, download automation and whatnot and this was what I eventually settled with. I had more reasons at the time, I just can't remember them. Anyway, let's not make a big discussion out of this, this is what works for me.


    4) After reading a bit about that, I think it's possible but I'm not exactly sure what to put no /etc/fstab with the bind option to override the noexec from the first mount. And again, I like to keep things nice and tidy, building stuff on /root or /opt, is not an option for me and since I keep the source code around (so I don't have to keep cloning everything every time), /root and /opt is not the right folder to do so. I do all that inside my "workspace" folder which is inside my user home folder. That's how I like to keep things.


    Thanks for your input, I can at least improve my setup :)

    • Offizieller Beitrag
    Zitat

    is not an option for me and since I keep the source code around (so I don't have to keep cloning everything every time), /root and /opt is not the right folder to do so. I do all that inside my "workspace" folder which is inside my user home folder. That's how I like to keep things.


    You can make a random folder in / and link it to your home folder, from there you can make your software building.


  • You can make a random folder in / and link it to your home folder, from there you can make your software building.


    Err... That's the same thing and against my "nice and tidy".


    Anyway, there's just no reason to continue arguing this and having this conversation. I have my way of doing things and I'm not going to change that nor am I'm trying to change how others do their things. What ever works for everyone :)

  • and Volker has his way of doing things -> noexec on data-partitions

    In a nutshell, I think that OMV should reconsider how it handles mounted partitions that are not data partitions, which options it uses to mount those and where it mounts them. Like I said, these could all be advanced settings for an advanced used which are only visible by toggling an advanced option somewhere in the filesystem as a matter of protection against newbies.


    On the other side , you can reconsider putting your scripts in /usr/local/bin
    a Data-Partition on the system-drive was not intended to be used as a home-folder


    We have to find the middle way. No offence! :)


    Feel free to add a feature Request on manitis: http://bugtracker.openmediavault.org/main_page.php

  • I think this feature is not added for good reason. However, an advanced user can simply modify their options for a given drive in /etc/fstab. Make a backup of your fstab file and then simply take the noexec option off the line of the drive in question. Then reboot.

  • @Solo0815
    But that's the thing... I'm the one who defines, on my system, what is a data partition and what is not, OMV is assuming that whatever is mounted through it's interface, must be a data partition. And that might not be always the case. But that's fine if that's Volker intended behavior, it's his software, he has his reasons for doing so. From my point of view, users should be able to pick if a partition is a data partition or not and with that, pick their options.


    I can understand some reasons for doing things a certain a way, trust me, I do. It's just that I've always defended that users should have enough flexibility to pick their own options and configurations. That's why I recommended to have advanced options for advanced users. I don't mind getting my hands dirty on the command line, I just prefer UIs :P


    But then again, I don't need them as long as they are achievable some other way without overwriting core OMV files. Which I was not doing until I created this thread and @subzero79 posted some nice ideas. I have now restored /etc/default/openmediavault to it's original state and did all my changes in /etc/fstab like this:



    This works for me and I'm more than comfortable with this solution. With the suggestion from @subzero79, I've also explored the possible options for /etc/inputrc :)


    With both these things, I've solved all my problems on this thread (unless someone finds a problem in my fstab). So thank you all.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!