| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <d01549650704140836o3046ec5fua89d7f5404c96f7c@mail.gmail.com> |
| Date: | Sat, 14 Apr 2007 16:36:44 +0100 |
| From: | "Jamie Mortimore" <jamie DOT mortimore AT googlemail DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Unable to open /dev/mem: permission denied |
| MIME-Version: | 1.0 |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
Hi,
There is probably a straightforward answer to this question. I am
trying to run a c program under cygwin that I have compiled using gcc
in cygwin. The program is trying to open /dev/mem in read/write mode.
However I always get permission denied. The code looks like:
int fd = open("/dev/mem", O_RDWR);
if(fd < 0) {
perror("Unable to open /dev/mem");
exit(2);
}
The output I get from this is:
Unable to open /dev/mem: Permission denied
I have set up a root user (in /etc/passwd) and am running the program
as root but this doesn't solve the problem. Any help much appreciated.
Thanks,
Jamie.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |