• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

RPM wont create directory correctly -rwxrwxrwx vs drwxrwxrwx

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Everyone,

I am modifying an RPM that previously ran in 32 bit Centos to 64 bit Centos. Previously I would create a folder i386 (drwxrwxrwx) and write a couple files to it. This worked fine, then I changed the name of the folder I was creating to x86_64, and when I attempt to write to it I receive an error informing me its not a directory. When I do an ls -al I get -rwxrwxrwx... however I am using the same line syntax "mkdir -p %{_topdir}/RPMS/x86_64 or /i386" Is this related to the underscore? Is their a way to compensate here? I feel like this shouldn't be an issue. Also as a side NOTE before the Linux gurus freak out I am not a actually using rwxrwxrwx it just to hopefully better illustrates that the d is missing.

Thanks guys!
 
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Lark wrote:Hey Everyone,

I am modifying an RPM that previously ran in 32 bit Centos to 64 bit Centos. Previously I would create a folder i386 (drwxrwxrwx) and write a couple files to it. This worked fine, then I changed the name of the folder I was creating to x86_64, and when I attempt to write to it I receive an error informing me its not a directory. When I do an ls -al I get -rwxrwxrwx... however I am using the same line syntax "mkdir -p %{_topdir}/RPMS/x86_64 or /i386" Is this related to the underscore? Is their a way to compensate here? I feel like this shouldn't be an issue. Also as a side NOTE before the Linux gurus freak out I am not a actually using rwxrwxrwx it just to hopefully better illustrates that the d is missing.

Thanks guys!



I know my answer might not be helpful (as I'm not into creating own RPMs etc.) - but just check out if there is any space in the path.
e.g. would create a RPMS dir, and inside that a x86_64 dir. However, would create two dirs (RPMS and x86_64) at same level. Further, if you copy something at RPMS/x86_64, then a file x86_64 would be created.

Besides this, the underscore should not create any issue. It is a valid filename/dirname character.

This is a very wild guess. Btw, I'm not a Linux guru, but that 777 permission thing got freaked me out
 
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a cynic, so I'd be looking at whether there are selinux issues showing up in the audit log.

However, you are apparently creating directories programmatically in the RPM, and for the most part I'd just use a file specifier to do that. Then again, since you're doing a mkdir and the result is listing as a file, maybe you did provide a (incorrect) file specifier and it interfered with the script doing the mkdir.
 
Rancher
Posts: 1044
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is Umask?
 
To avoid criticism do nothing, say nothing, be nothing. -Elbert Hubbard. Please critique this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic