X-Spam-Check-By: sourceware.org Message-ID: Date: Sat, 14 Apr 2007 16:36:44 +0100 From: "Jamie Mortimore" To: cygwin AT cygwin DOT com Subject: Unable to open /dev/mem: permission denied MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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/