LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 06-01-2009, 06:33 PM   #1
w1k0
Member
 
Registered: May 2008
Posts: 934

Rep: Reputation: 107Reputation: 107
Inappropriate ioctl for device while reading flags


I can't use lsattr and chattr commands in my system. I used both many years ago. Now both these commands display error messages. I tried them with different files. The result is always the same:

Code:
# lsattr /etc/lilo.conf
lsattr: Inappropriate ioctl for device While reading flags on /etc/lilo.conf

# chattr +i /etc/lilo.conf
chattr: Inappropriate ioctl for device while reading flags on /etc/lilo.conf

# chattr -i /etc/lilo.conf
chattr: Inappropriate ioctl for device while reading flags on /etc/lilo.conf
I use Slackware 12.2.

Any assistance will be appreciated.
 
Old 06-01-2009, 07:31 PM   #2
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 464

Rep: Reputation: 43
First I've heard of these commands, good to learn about new things!

From the man page: lsattr - list file attributes on a Linux second extended file system

Are you using ext2 or ext3 at that location? Any files I try that are located on a ReiserFS partition give me that error there, while ext2 and ext3 files seemed to return just fine.
 
Old 06-01-2009, 07:41 PM   #3
w1k0
Member
 
Registered: May 2008
Posts: 934

Original Poster
Rep: Reputation: 107Reputation: 107
Well... It's good to read man pages from time to time. During last ten years I changed file system for a few times. I used lsattr and chattr long time ago. In the meantime I switched file system to ReiserFS. Thank you very much.
 
Old 06-01-2009, 07:45 PM   #4
w1k0
Member
 
Registered: May 2008
Posts: 934

Original Poster
Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by piete View Post
good to learn about new things!
So maybe you'll be interested in my old script I used to made the system more secure:

# cat immutable
Code:
#!/bin/sh

# lists or changes selected files attributes
# requires ext2 or ext3 file systems

for file in inetd.conf services passwd shadow group gshadow lilo.conf
do
    if [ "$1" == "" ]    ; then lsattr    /etc/$file ; fi
    if [ "$1" == "on" ]  ; then chattr +i /etc/$file ; fi
    if [ "$1" == "off" ] ; then chattr -i /etc/$file ; fi
done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inappropriate ioctl for device with perl Punakuono Linux - Newbie 3 05-15-2009 02:05 AM
inappropriate ioctl for device praetorrian Linux - Software 1 05-09-2006 12:11 AM
Extremely poor SATA performance (Inappropriate ioctl for device) kyletriggs Linux - Hardware 7 02-14-2006 01:14 AM
Inappropriate ioctl for device(25) why1957 Linux - Networking 0 08-03-2003 04:45 AM
stty: standard input: Inappropriate ioctl for device fwalthard Linux - General 0 07-14-2003 02:55 AM


All times are GMT -5. The time now is 08:06 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration