LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 08-16-2005, 03:02 AM   #1
Ikebo
Member
 
Registered: Jun 2004
Location: Michigan, USA
Distribution: Ubuntu
Posts: 77

Rep: Reputation: 15
/sbin/mkswap: Permission Denied


Creating a 1gig swapfile with the command:

Code:
dd if=/dev/zero of=swapfile bs=1024 count=1M
works to create the file on disk but the command:

Code:
/sbin/mkswap -c swapfile
returns the error:

Code:
swapfile: Permission denied
as root even though I have complete access to read and write to/from the file.

I am running a brand new installation of Fedora Core 4 on an ex2 partition with SELinux enabled and currently no swap space (I didn't create a swap partition hoping to to make a swap file after installation).

Any ideas?
 
Old 08-16-2005, 03:50 AM   #2
Ikebo
Member
 
Registered: Jun 2004
Location: Michigan, USA
Distribution: Ubuntu
Posts: 77

Original Poster
Rep: Reputation: 15
It appears that using setenforce 0 will allow me to run mkswap and swapon, but even if I add the swapfile to /etc/fstab it will not load the swapfile on boot.

Any ideas there?
 
Old 08-16-2005, 05:35 PM   #3
Ikebo
Member
 
Registered: Jun 2004
Location: Michigan, USA
Distribution: Ubuntu
Posts: 77

Original Poster
Rep: Reputation: 15
I can't figure this one out. I think its a matter of matching the security contexts of the swapfile and kswapd but I am not sure.

For now I am going to have to rig a user boot script like so:

Code:
setenforce 0
swapon -a
setenforce 1
Any help in this situation would be greatly appreciated.
 
Old 08-16-2005, 11:11 PM   #4
Ikebo
Member
 
Registered: Jun 2004
Location: Michigan, USA
Distribution: Ubuntu
Posts: 77

Original Poster
Rep: Reputation: 15
After tracking down my AVC error in /var/log/messages I was able to search with a bit more information. I found a bugzilla bug already filed with this problem.

It seems until this bug is fixed, the startup script plan may have to suffice.
 
  


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
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
permission denied . . . zthomasz Linux - Newbie 1 06-21-2003 03:54 AM
/usr/sbin/dns-keygen; permission denied da_kidd_er Linux - Software 1 02-27-2003 04:30 AM
Permission Denied lackof Linux - Networking 1 08-14-2002 10:46 PM
Permission denied? jbhoo Linux From Scratch 1 04-27-2002 09:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:24 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