|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
1.5.24 unable to access files via root / (forward slash)Hi,
I'm trying to access files for reading via the / directive, i.e. vi /usr/foo.txt However, this will not open foo.txt, vi creates a new file in the current directory instead. I can cd to the /usr directory and open the file with vi usr.txt. I'm using vi as an example, I'm actually trying to compile files with a gcc variant, and it can't access files the the / path either. I've checked with the mount command that / is mounted, and it reports: D:\cygwin_root on / type system (binmode) Output from ls -lg /usr shows -rwxrwxrwx 1 mkgroup-l-d 13 Feb 20 13:33 foo.txt Which seems ok from what I've read? I've attached the output from cygcheck using cygcheck -srvv. Apologies if I'm missing something really simple here. cygcheck.out Thanks in advance, Jeff. |
|
|
Re: 1.5.24 unable to access files via root / (forward slash)On Tue, Feb 20, 2007 at 05:44:51AM -0800, Jeff2007 wrote:
>Hi, > >I'm trying to access files for reading via the / directive, i.e. vi >/usr/foo.txt >However, this will not open foo.txt, vi creates a new file in the current >directory instead. >I can cd to the /usr directory and open the file with vi usr.txt. I'm using >vi as an example, I'm actually trying to compile files with a gcc variant, >and it can't access files the the / path either. > >I've checked with the mount command that / is mounted, and it reports: >D:\cygwin_root on / type system (binmode) >Output from ls -lg /usr shows >-rwxrwxrwx 1 mkgroup-l-d 13 Feb 20 13:33 foo.txt >Which seems ok from what I've read? > >I've attached the output from cygcheck using cygcheck -srvv. Apologies if >I'm missing something really simple here. > >http://www.nabble.com/file/6655/cygcheck.out cygcheck.out Well, from the cygcheck output, it seems like you aren't actually running a cygwin version of vim, so it is unlikely that 'vi' would understand cygwin's mount table. cgf -- 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/ |
|
|
Re: 1.5.24 unable to access files via root / (forward slash)Jeff2007 wrote:
> I'm trying to access files for reading via the / directive, i.e. vi > /usr/foo.txt > However, this will not open foo.txt, vi creates a new file in the current > directory instead. > I can cd to the /usr directory and open the file with vi usr.txt. I'm using > vi as an example, I'm actually trying to compile files with a gcc variant, > and it can't access files the the / path either. You have a whole mess of non-Cygwin programs in your path. In the case of vi, you're using: Found: c:\WATCOM\BINNT\vi.exe Not Found: vim Cygwin POSIX paths only work in Cygwin programs. You can't expect some Watcom version of vi to know anything about them. If you want to use vi in Cygwin, install the Cygwin version (vim package.) And likewise with gcc, you don't have a Cygwin version of gcc installed. This means you won't be able to use POSIX paths, and you won't be compiling Cygwin binaries. If you want consistency in your command line tools you really need to clean up your PATH. For one thing it looks like it contains invalid characters: "C D:\cygwin_root\Program Files\AMD\CodeAnalyst\bin" "C D:\cygwin_root\Program Files\AMD\CodeAnalyst\" This usually happens when you have typos like "C;D:\foo". You need to fix those, but in general you need to remove a bunch of the crap you have in there, or otherwise realize that when invoking a non-Cygwin binary you can't use Cygwin features such as POSIX paths. Or use cygpath to convert between them. Brian -- 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/ |
|
|
Re: 1.5.24 unable to access files via root / (forward slash)>You have a whole mess of non-Cygwin programs in your path. Ah... it looks like I have a lot of housekeeping to take care of that I didn't know about. I need to do some reading up on the PATH variable, I thought it was only the stuff in /usr/etc/profile that set the PATH. Thanks! Jeff. |
|
|
Re: 1.5.24 unable to access files via root / (forward slash)Just to conclude my query, in the file usr/etc/profile I've added the line:
PATH= Above my other PATH variables. When I run cygcheck again, all of the pre-existing Windows Path environment variables have gone, which seems to be what I needed to happen. Thanks to all, Jeff. |
|
|
Re: 1.5.24 unable to access files via root / (forward slash)* Jeff2007 (Tue, 20 Feb 2007 07:22:54 -0800 (PST))
> Just to conclude my query, in the file usr/etc/profile I've added the line: > PATH= > > Above my other PATH variables. When I run cygcheck again, all of the > pre-existing Windows Path environment variables have gone, which seems to be > what I needed to happen. No. You were advised to clean up your Windows paths - which are a mess. You've just "cleaned up" by putting the dirt "under the carpet". Do not modify /etc/profile unless you know what you're doing. In this case it's obvious you're not. Thorsten -- 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/ |
|
|
Re: 1.5.24 unable to access files via root / (forward slash)On 2/20/07, Jeff2007 wrote:
> > Hi, > > I'm trying to access files for reading via the / directive, i.e. vi > /usr/foo.txt > However, this will not open foo.txt, vi creates a new file in the current > directory instead. > I can cd to the /usr directory and open the file with vi usr.txt. I'm using > vi as an example, I'm actually trying to compile files with a gcc variant, > and it can't access files the the / path either. > > I've checked with the mount command that / is mounted, and it reports: > D:\cygwin_root on / type system (binmode) > Output from ls -lg /usr shows > -rwxrwxrwx 1 mkgroup-l-d 13 Feb 20 13:33 foo.txt > Which seems ok from what I've read? > > I've attached the output from cygcheck using cygcheck -srvv. Apologies if > I'm missing something really simple here. > > http://www.nabble.com/file/6655/cygcheck.out cygcheck.out > > Thanks in advance, > > > Jeff. > -- Jeff, mkgroup-l-d means that Cygwin doesn't know what group you are in. I believe when you run bash for the first time, you should see something like this: Your group name is currently "mkgroup_l_d". This indicates that not all domain users and groups are listed in the /etc/passwd and /etc/group files. See the man pages for mkpasswd and mkgroup then, for example, run mkpasswd -l -d > /etc/passwd mkgroup -l -d > /etc/group This message is only displayed once (unless you recreate /etc/group) and can be safely ignored. Following that advice won't fix your path problems, but it is probably something you should remedy as it could lead to problems or confusion in the future. -Jason -- 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/ |
|
|
Re: 1.5.24 unable to access files via root / (forward slash)On 2/20/07, Jeff2007 wrote:
> > Hi, > > I'm trying to access files for reading via the / directive, i.e. vi > /usr/foo.txt > However, this will not open foo.txt, vi creates a new file in the current > directory instead. > I can cd to the /usr directory and open the file with vi usr.txt. I'm using > vi as an example, I'm actually trying to compile files with a gcc variant, > and it can't access files the the / path either. > > I've checked with the mount command that / is mounted, and it reports: > D:\cygwin_root on / type system (binmode) > Output from ls -lg /usr shows > -rwxrwxrwx 1 mkgroup-l-d 13 Feb 20 13:33 foo.txt > Which seems ok from what I've read? > > I've attached the output from cygcheck using cygcheck -srvv. Apologies if > I'm missing something really simple here. > > http://www.nabble.com/file/6655/cygcheck.out cygcheck.out > > Thanks in advance, > > > Jeff. > -- Jeff, mkgroup-l-d means that Cygwin doesn't know what group you are in. I believe when you run bash for the first time, you should see something like this: Your group name is currently "mkgroup_l_d". This indicates that not all domain users and groups are listed in the /etc/passwd and /etc/group files. See the man pages for mkpasswd and mkgroup then, for example, run mkpasswd -l -d > /etc/passwd mkgroup -l -d > /etc/group This message is only displayed once (unless you recreate /etc/group) and can be safely ignored. Following that advice won't fix your path problems, but it is probably something you should remedy as it could lead to problems or confusion in the future. -Jason -- 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/ |
| Free embeddable forum powered by Nabble | Forum Help |