www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Permission denied under Ubuntu.

reply Charles McAnany <mcanance rose-hulman.edu> writes:
Hi, all.
I installed  dmd_2.054-0_amd64.deb on Ubuntu 11.04, and the compiler
seems to work fine, but I can't execute its output. Here's what I'm
doing: (ls to show directory contents)

$ dmd testFile.d
$ ./testFile
   bash: ./testFile: Permission denied

testFile.d is the Hello world program exactly as it appears on page 1
of TDPL.

Has anyone else had this issue? If it helps, I let the software center
thing do the installing, so if I need to manually change the
permission of something, I probably haven't done that.
Aug 08 2011
parent reply Andrew Wiley <wiley.andrew.j gmail.com> writes:
On Mon, Aug 8, 2011 at 4:30 PM, Charles McAnany <mcanance rose-hulman.edu>wrote:

 Hi, all.
 I installed  dmd_2.054-0_amd64.deb on Ubuntu 11.04, and the compiler
 seems to work fine, but I can't execute its output. Here's what I'm
 doing: (ls to show directory contents)

 $ dmd testFile.d
 $ ./testFile
   bash: ./testFile: Permission denied

 testFile.d is the Hello world program exactly as it appears on page 1
 of TDPL.

 Has anyone else had this issue? If it helps, I let the software center
 thing do the installing, so if I need to manually change the
 permission of something, I probably haven't done that.
Try `chmod +x dmd` (when in the same directory as the dmd executable). That should get fixed in the package though.
Aug 08 2011
parent reply Johannes Pfau <spam example.com> writes:
Andrew Wiley wrote:
Try `chmod +x dmd` (when in the same directory as the dmd executable).
That should get fixed in the package though.
Shouldn't it be `chmod +x testFile`? If I read his question correctly, compiling with dmd worked, only running the compiled program failed. However, dmd always correctly flagged files as executable for me. Charles could you try `chmod +x testFile` and see if it fails? The filesystem testFile is on could be configured to disallow executing programs. -- Johannes Pfau
Aug 09 2011
parent Andrew Wiley <wiley.andrew.j gmail.com> writes:
On Tue, Aug 9, 2011 at 1:40 AM, Johannes Pfau <spam example.com> wrote:

 Andrew Wiley wrote:
Try `chmod +x dmd` (when in the same directory as the dmd executable).
That should get fixed in the package though.
Shouldn't it be `chmod +x testFile`? If I read his question correctly, compiling with dmd worked, only running the compiled program failed.
Yes, it should be. /me needs to learn him an English for great good.
 However, dmd always correctly flagged files as executable for me.
  Charles could you try `chmod +x testFile` and see if it fails? The
 filesystem testFile is on could be configured to disallow executing
 programs.
If that's the case, we may have found a reason for DMD to emit a warning that Walter will approve!
Aug 09 2011