LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-08-2011, 09:22 AM   #16
DarbieL
LQ Newbie
 
Registered: Jun 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled

The directory I am doing the program in, Penguin\ Power/, is in a Windows partition, either NTFS or FAT. Is that the problem?
 
Old 06-08-2011, 09:25 AM   #17
octoberblu3
Member
 
Registered: Oct 2005
Distribution: Slackware64-current
Posts: 67

Rep: Reputation: 22
If you are trying this in the same directory as before, you may need to pull root again to delete the existing "helloworld". As a normal user, you won't be able to delete and overwrite the file create by root, or change its permissions.

In fact, as root, give the user you created full access to the directory.

chown -R yourusername:users /files/penguin\ power/

Then you should be able to rm the old executable and try compiling again as a normal user.

EDIT: Never mind the above. Yes, doing this on a NTFS partition probably isn't the best idea unless you do some extra work. Try working in your home directory as suggested above.

Last edited by octoberblu3; 06-08-2011 at 09:27 AM.
 
Old 06-08-2011, 09:26 AM   #18
bosth
Member
 
Registered: Apr 2011
Location: British Columbia, Canada
Posts: 304

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by DarbieL View Post
The directory I am doing the program in, Penguin\ Power/, is in a Windows partition, either NTFS or FAT. Is that the problem?
Possibly... try compiling and running from a Linux partition and let's see how that goes.
 
Old 06-08-2011, 09:39 AM   #19
DarbieL
LQ Newbie
 
Registered: Jun 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
I moved the program to my home directory and it runs. the chown command didn't work it said cannot find directory. I don't need to use it though. I'll just use the Linux partition. I would have never thought to try a linux partition to get it working. I'm marking this thread as solved. thank you both
 
Old 06-08-2011, 09:55 AM   #20
bosth
Member
 
Registered: Apr 2011
Location: British Columbia, Canada
Posts: 304

Rep: Reputation: 127Reputation: 127
As a post-script: obtoberblu3 might be right.

Try deleting (as root!) the original directory you were using on the NTFS partition. Then start over as a normal user: compile and run your code on the NTFS partition. It may well work.
 
Old 06-08-2011, 12:43 PM   #21
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cin in cpp , milky.way Programming 4 12-08-2007 10:16 AM
debian dpkg cpp depends on cpp error darkleaf Linux - Software 2 06-25-2004 01:47 AM
cpp error ANU Linux - Software 1 12-05-2003 11:24 PM
cpp: pointers Wonko the Sane Programming 3 11-17-2003 03:38 AM
Now I have gcc/cpp/cpp, but still can't install sfingerh Linux - Software 2 07-30-2002 03:13 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration