On Sat, Apr 16, 2016 at 11:43:27AM -0400, Richard Heck wrote:
> On 04/16/2016 10:36 AM, Wolfgang Engelmann wrote:
> >
> >
> > On 16.04.2016 16:13, Richard Heck wrote:
> >> On 04/16/2016 09:22 AM, Wolfgang Engelmann wrote:
> >>>
> >>> On 16.04.2016 14:56, Richard Heck wrote:
> >>>> On 04/16/2016 04:47 AM, Wolfgang Engelmann wrote:
> >>>>>
> >>>>> Am 16.04.2016 um 10:42 schrieb Wolfgang Engelmann:
> >>>>>>
> >>>>>> Am 16.04.2016 um 08:58 schrieb Guenter Milde:
> >>>>>>> On 2016-04-15, Scott Kostyshak wrote:
> >>>>>>>> On Fri, Apr 15, 2016 at 12:02:16PM +0200, Wolfgang Engelmann
> >>>>>>>> wrote:
> >>>>>>>>> but still have no access:
> >>>>>>>>> we@wolfgang-Mr-Whisper-Ultra-SSD-II:/mnt/sdb/we/Desktop/lyx-2.2.0rc1$
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> ./configure
> >>>>>>>>> bash: ./configure: Keine Berechtigung
> >>>>>>> ...
> >>>>>>>
> >>>>>>>> I have no idea why you get that error though. You should have
> >>>>>>>> write access to that folder, the configure file itself is owned
> >>>>>>>> by you (we), and the exec bit is set. I am stumped.
> >>>>>>>> I would suggest trying to run a very simple executable:
> >>>>>>>> 1. create a file on your desktop called "hello" with the
> >>>>>>>> following contents:
> >>>>>>>> -----
> >>>>>>>> #!/bin/bash
> >>>>>>>> echo "hello world"
> >>>>>>>> -----
> >>>>>>>> then run
> >>>>>>>> chmod +x ./hello
> >>>>>>>> ./hello
> >>>>>>>> Does that work?
> >>>>>>>> Regardless of the above, what is the exit code after you run
> >>>>>>>> ./configure
> >>>>>>>> ?
> >>>>>>>> To find that out, run the following immediately after:
> >>>>>>>> echo $?
> >>>>>>> Some Linux distributions/installations prevent running of files on
> >>>>>>> certain devices, e.g. anything from an USB-stick because of
> >>>>>>> security reasons.
> >>>>>>>
> >>>>>>> /mnt/sdb/ looks like a removable device, so maybe you try after
> >>>>>>> copying to a hard disk or find the setting to enable executing
> >>>>>>> from removable devices?
> >>>>>>>
> >>>>>>> Günter
> >>>>>>>
> >>>>>>>
> >>>>>> I have appended a screenshot in my last mail showing the hierarchy
> >>>>>> of myPC. I have an ssd harddisk (sda) AND a 2 TB harddisk (sdb)
> >>>>>> which serves as my home. Not sure whether this is the problem.
> >>>>>> Wolfgang
> >>>>>>
> >>>>> Forgot to say: sda and sdb are both in the PC, no external disk
> >>>>> switched on.
> >>>> Definitely try what Scott suggested. It may be that you cannot
> >>>> execute files from /mnt/sdb/.  I always disable execution from /tmp/
> >>>> myself, and other systems do it for other devices. You could also try
> >>>> posting here the output of "findmnt /dev/sdb/".
> >>>>
> >>>> Richard
> >>>>
> >>> Tried Scotts proposals:
> >>>
> >>> A.
> >>> content of the hello file:
> >>>
> >>> #!/bin/bash
> >>>
> >>> echo "hello world"
> >>>
> >>>
> >>> ~/Desktop$ ls -l ./hello
> >>> -rwxr-xr-x 1 we we 31 Apr 16 10:03 ./hello
> >>>
> >>> ~/Desktop$ ./hello
> >>> bash: ./hello: Keine Berechtigung
> >> So your system is prohibiting you from running executable files from
> >> /dev/sdb/we/Desktop/. This is why even "sh configure" fails: It lets you
> >> run configure, but you can't run the compiled test programs from that
> >> sort of directory either.
> >>
> >>> C. tried Richards
> >>> we@wolfgang-Mr-Whisper-Ultra-SSD-II:/$ findmnt /dev/sdb/
> >>> we@wolfgang-Mr-Whisper-Ultra-SSD-II:/$
> >>> (no output)
> >> Sorry, I should have said "findmnt /mnt/sdb/", since that is where your
> >> home directory is mounted.
> >>
> >> You can check what logical device the relevant directory is located on
> >> by doing:
> >>      > df /home/we/Desktop/
> >> Whatever it reports is what we want to check. This is probably /dev/sdb1
> >> or something like that. In that case, "findmnt /dev/sdb1" will likely
> >> give you the same output as "findmnt /mnt/sdb".
> >>
> >> You're basically looking for the "noexec" option, as here:
> >>
> >> /home/rgheck/ > findmnt /backup
> >> TARGET  SOURCE    FSTYPE OPTIONS
> >> /backup /dev/sdb1 ext4   rw,noexec,noatime,data=ordered
> >>
> >> Richard
> >>
> >
> > Here it is:
> > $ findmnt /mnt/sdb/
> > TARGET   SOURCE    FSTYPE OPTIONS
> > /mnt/sdb /dev/sdb1 ext4 rw,nosuid,nodev,noexec,relatime,data=ordered
> 
> Yes, well, that would be the problem: The "noexec" flag precisely
> disallows execution of files on that device. (I.e., the executable
> permission is ignored.) I don't know which distro you are using, and
> even if I did I'd still probably not know exactly how it got there. But
> the reason it gets added is as a security measure. E.g., as things are,
> even if you were somehow tricked into downloading an executable file
> from the web to /home/we/Downloads/, you can't run it.
> 
> You have two options.
> 
> (1) Remove the noexec option from /mnt/sdb. This probably means editing
> /etc/fstab, though your distro may provide a graphical program for doing
> this as well (not that I've ever heard of one, just saying....). The
> downside to this is that it would give up the security advantages of the
> noexec flag.
> 
> (2) Compile lyx somewhere else on your machine, i.e., in some directory
> that is NOT under /mnt/sdb/. E.g., you could create a new /src/
> directory, and put anything you want to compile there. Thus:
>     > sudo mkdir /src/
>     > sudo chown we:we /src/
> Now you can copy the LyX tarball to /src/ and unpack it there, and
> everything should be fine. Of course, the downside to this option may
> well be that your SSD doesn't have a lot of extra space on it. Compiling
> LyX will probably need at least 2GB, possibly more.
> 
> If you can go route (2), that's what I'd suggest.

I'm glad the puzzle is finally solved. I agree with Richard that (2) is
the safest, but as Richard hints also you should figure out how this
happened in the first place. Further, once you compile a complicated
program like LyX and see that it is actually very easy once you have the
dependencies and only takes three commands, you might want to compile
other programs (using a similar three commands!), and it is convenient
to compile them wherever you choose.

Scott

Attachment: signature.asc
Description: PGP signature

Reply via email to