• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RPM wont create directory correctly -rwxrwxrwx vs drwxrwxrwx

 
John Lark
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • 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!
 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • 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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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.
 
Ivan Jozsef Balazs
Rancher
Posts: 972
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is Umask?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic