This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

file not working on executables?


I installed the latest Cygwin a couple of days ago.  "file" now
produces no information for binary executables.  Anyone else seeing
this problem?  (I checked that "file" is /usr/bin/file.)

$ file /usr/bin/ls.exe
/usr/bin/ls.exe: 
$ file /cygdrive/c/WINDOWS/system32/net.exe
/cygdrive/c/WINDOWS/system32/net.exe: 
$ file /etc/profile
/etc/profile: ASCII English text
$ file ~/.profile
/home/luke/.profile: Bourne shell script text executable

A bit odd that it got /etc/profile wrong, too.

cygcheck -s is attached.  I think my magic files are okay.  Here's part
of an strace of ls /usr/bin/ls.exe

   52  294897 [main] file 2168 __set_errno: int stat_worker(const char*, __stat64*, int):1040 val 2
   65  294962 [main] file 2168 stat_worker: -1 = (/home/luke/.magic, 0x22EE60)
128276  423238 [main] file 2168 open: open (/usr/share/file/magic.mgc, 0x0)
   89  423327 [main] file 2168 normalize_posix_path: src /usr/share/file/magic.mgc
   50  423377 [main] file 2168 normalize_posix_path: /usr/share/file/magic.mgc = normalize_posix_path (/usr/share/file/magic.mgc)
   51  423428 [main] file 2168 mount_info::conv_to_win32_path: conv_to_win32_path (/usr/share/file/magic.mgc)
   57  423485 [main] file 2168 set_flags: flags: text (0x2000000)
   51  423536 [main] file 2168 mount_info::conv_to_win32_path: src_path /usr/share/file/magic.mgc, dst C:\cygwin\usr\share\file\magic.mgc, flags 0x2000008, rc 0
  313  423849 [main] file 2168 symlink_info::check: not a symlink
   50  423899 [main] file 2168 symlink_info::check: 0 = symlink.check (C:\cygwin\usr\share\file\magic.mgc, 0x22E360) (0x2000008)
   57  423956 [main] file 2168 path_conv::check: this->path(C:\cygwin\usr\share\file\magic.mgc), has_acls(1)
   57  424013 [main] file 2168 build_fh_pc: fh 0x61155E50
  237  424250 [main] file 2168 fhandler_base::open: (C:\cygwin\usr\share\file\magic.mgc, 0x100000)
  166  424416 [main] file 2168 fhandler_base::set_flags: flags 0x100000, supplied_bin 0x20000
   53  424469 [main] file 2168 fhandler_base::set_flags: filemode set to text
   48  424517 [main] file 2168 fhandler_base::open: 0 = NtCreateFile (0x728, 80100000, C:\cygwin\usr\share\file\magic.mgc, io, NULL, 0, 7, 1, 20, NULL, 0)
   55  424572 [main] file 2168 fhandler_base::open: 1 = fhandler_base::open (C:\cygwin\usr\share\file\magic.mgc, 0x100000)
   53  424625 [main] file 2168 fhandler_base::open_fs: 1 = fhandler_disk_file::open (C:\cygwin\usr\share\file\magic.mgc, 0x0)
   60  424685 [main] file 2168 open: 3 = open (/usr/share/file/magic.mgc, 0x0)
  122  424807 [main] file 2168 get_file_attribute: file: C:\cygwin\usr\share\file\magic.mgc
  156  424963 [main] file 2168 cygpsid::debug_print: get_sids_info: owner SID = S-1-5-32-544
   51  425014 [main] file 2168 cygpsid::debug_print: get_sids_info: group SID = S-1-5-18
   74  425088 [main] file 2168 get_info_from_sd: ACL 1E8, uid 544, gid 18
   90  425178 [main] file 2168 fhandler_base::fstat_helper: 0 = fstat (, 0x22EB30) st_atime=4317C819 st_size=902784, st_mode=0x81E8, st_ino=34923, sizeof=96
   57  425235 [main] file 2168 fstat64: 0 = fstat (3, 0x22EB30)
   64  425299 [main] file 2168 mmap64: addr 0, len 902784, prot 3, flags 2, fd 3, off 0
  148  425447 [main] file 2168 fhandler_disk_file::mmap: BA0000 = MapViewOfFileEx (h:704, access:1, 0, off:0, len:902784, addr:0)
   75  425522 [main] file 2168 mmap64: BA0000 = mmap() succeeded
   50  425572 [main] file 2168 close: close (3)
   52  425624 [main] file 2168 fhandler_base::close: closing /usr/share/file/magic.mgc handle 0x728

$ ls -l /usr/share/file/magic*
-rwxr-x---  1 Administrators SYSTEM 419946 Aug 27 08:51 /usr/share/file/magic
-rwxr-x---  1 Administrators SYSTEM 902784 Aug 27 08:51 /usr/share/file/magic.mgc
-rwxr-x---  1 Administrators SYSTEM  30955 Aug 27 08:51 /usr/share/file/magic.mime
-rwxr-x---  1 Administrators SYSTEM  43904 Aug 27 08:51 /usr/share/file/magic.mime.mgc

luke

Attachment: cygcheck.txt
Description: cygcheck.txt

--
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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]