LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 07-28-2005, 03:03 AM   #1
AK prince
LQ Newbie
 
Registered: Jul 2005
Location: Nanjing,China
Distribution: slackware10.2
Posts: 12

Rep: Reputation: 0
Smile how to change the file permission ??


I want change the file "/mnt/work" permission, I used "chmod 777 /mnt/work" ,

it's useless.

But if I setup a new file in the "/mnt", I could change its permission.

By the way, "work" is a directory which I mounted a section of my windows part.

Thank you for you guys help.
 
Old 07-28-2005, 03:25 AM   #2
rkrishna
Member
 
Registered: Mar 2005
Location: chennai(madras), India
Distribution: slackware ofcourse
Posts: 654

Rep: Reputation: 32
go through chmod options

i think u missed -R option, this is for directories
ie chmod -R 777 /dir......... for ur case it is /mnt/work/

be sure to run this as root

if u simply type chmod 777 /dir/dir1 it will take as dir1 one as a file

please do a search n chmod changing permission in google

Last edited by rkrishna; 07-28-2005 at 03:53 AM.
 
Old 07-28-2005, 03:30 AM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Welcome to LQ!

I'm not sure I understand your question. Perhaps if you read this Quick and Dirty Guide to File Permissions first, then if you have any more questions, please post back. That guide was instrumental in helping me understand permissions, and I believe it will help you.
 
Old 07-28-2005, 05:05 AM   #4
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Windows does not have UNIX permissions. Therefore, you must set the permissions when mounting the partition (either through the fstab entry, or using -o with the mount command).
 
Old 07-28-2005, 11:33 AM   #5
rkrishna
Member
 
Registered: Mar 2005
Location: chennai(madras), India
Distribution: slackware ofcourse
Posts: 654

Rep: Reputation: 32
fstab looks like

now only i saw tht ur partition was mounted on thth dir

so plz send the fstab entry how u entered it
if so i donthtink that u can change the permission by chmod it is there in the fstab entry 10, 00 like things
plz reply back
 
Old 08-01-2005, 04:41 PM   #6
ride153
Member
 
Registered: Apr 2005
Location: Northeast USA
Distribution: current is PCLOS (server) and Suse (desktop)
Posts: 102

Rep: Reputation: 15
and keep in mind NTFS is read only
i dont think its possible to write to a NTFS partition
 
Old 08-01-2005, 06:06 PM   #7
objorkum
Member
 
Registered: Aug 2003
Location: Norway
Distribution: Slackware 10.0
Posts: 231

Rep: Reputation: 30
You want the option "umask=000"

Code:
mount -t ntfs -o ro,umask=000 /dev/hdX /mnt/work
Or put it in your fstab if you use that.
 
Old 08-02-2005, 09:12 PM   #8
AK prince
LQ Newbie
 
Registered: Jul 2005
Location: Nanjing,China
Distribution: slackware10.2
Posts: 12

Original Poster
Rep: Reputation: 0
This is my fstab:

/dev/hda11 swap swap defaults 0 0
/dev/hda10 / ext3 defaults 1 1
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
/dev/hda8 /mnt/work vfat auto 0 0


So far I used all the method but I cannot change the permission "/mnt/work " to

777.

help!!!
 
Old 08-02-2005, 10:41 PM   #9
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Try:
Code:
/dev/hda8       /mnt/work           vfat        auto,gid=100,user,umask=007         1   0
or
Code:
/dev/hda8       /mnt/work           vfat        auto,gid=100,user,umask=000         1   0

Last edited by gbonvehi; 08-02-2005 at 10:48 PM.
 
Old 08-03-2005, 03:44 AM   #10
rkrishna
Member
 
Registered: Mar 2005
Location: chennai(madras), India
Distribution: slackware ofcourse
Posts: 654

Rep: Reputation: 32
/mnt/work vfat auto,gid=100,user,umask=007 1 0 % 0 0 is ok
what about 0 0 and 0 1 entries i think both should be zeros here no dumb option, no need to backup tht partition

and also u didint mention which file sysem u have on /dev/hda fat32 or ntfs ?

is it possible to change permisssion through chmod to an fstab entry ? nope

uncomment that line in fstab and try manually mounting to some where (directory) in ur home directory and
check wether this works or not % or else it will tell it is already mounted

Quote:
But if I setup a new file in the "/mnt", I could change its permission.
it is similar to making a file in ur home dir ...

Quote:
By the way, "work" is a directory which I mounted a section of my windows part.
what windows part .........here it looks like a winblows drive (c:, d: etc) is it fat32 or ntfs

do root can change the files in /mnt/work

%%%%%%%%%%comment on cd drive and floppy
i hopw u also have some problem with cd drive too %cant mount write etc...

Last edited by rkrishna; 08-03-2005 at 03:55 AM.
 
Old 08-03-2005, 04:14 AM   #11
AK prince
LQ Newbie
 
Registered: Jul 2005
Location: Nanjing,China
Distribution: slackware10.2
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks all, I fixed the problem. But I don't understand it

means. (gid=100,user,umask=000 1 0) Can someone explain

it?
 
Old 08-03-2005, 04:29 AM   #12
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
You can find more info about it on fstab and mount man pages. To reach them type:
Code:
man fstab
and:
Code:
man mount
Basically the options means:
- gid=100 - Make the mounted device to be owned by group id 100 (users).
- user - Allow any user to mount the device and allow him to umount it.
- umask=000 - Give permissions for read,write,execute to owner,group and others.
- 1 means that the filesystem should be dumped by some backup/restore programs. Set that to 0, my mistake as stated by rkrishna
- 0 (in the last field) means that the filesystem shouldn't be checked by fsck.

Last edited by gbonvehi; 08-03-2005 at 04:33 AM.
 
Old 08-03-2005, 05:02 AM   #13
rkrishna
Member
 
Registered: Mar 2005
Location: chennai(madras), India
Distribution: slackware ofcourse
Posts: 654

Rep: Reputation: 32
cheers

Quote:
I fixed the problem. But I don't understand it
how? what have u done let us also know

regards
 
Old 08-03-2005, 09:00 PM   #14
AK prince
LQ Newbie
 
Registered: Jul 2005
Location: Nanjing,China
Distribution: slackware10.2
Posts: 12

Original Poster
Rep: Reputation: 0
Many thanks to all of you.

According to gbonvehi's method, I modified the fstab. Then I

use the command "chmond 777 /mnt/work". The permission is

become to "rwxrwxrwx".

I change the directory's permission because I want to use

samba to share my linux. So if I donot change the directory

"work" permission, it couldnot be access by others. And now

I could do it sccessfully.
 
Old 08-05-2005, 03:13 AM   #15
dyn0myte
LQ Newbie
 
Registered: Jun 2005
Distribution: Slack 10.1
Posts: 22

Rep: Reputation: 15
SLack 10.1
115GB IBM /dev/hda (windoze) ntfs
160GB WD /dev/hdb (Slack) Linux partition
40GB Maxtor /dev/hde (personal) ntfs

my problem is writing to the Maxtor; not even a text file will write to it! I use it to share my files between the operating systems.
I cannot reset the permissions on this drive;
tells me the location is read only. Then I found the "no write" to ntfs info.
Would making it FAT32 fix this and still act right in BOTH operating systems?

THanks. I had to scour the 'net to find that little trinket of info.
Dyn0myt3
 
  


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
using chmod to change file permission kiwidoc Linux - Newbie 3 07-25-2004 06:39 AM
chmod 755 won't change file permission. duffboygrim Linux - General 11 04-29-2004 06:17 PM
Cannot Change File Permission dsuratman Linux - Newbie 12 11-03-2003 01:47 PM
File permission display and change in GCC Lord CyKill Programming 1 09-26-2003 07:33 AM
cp command change the file permission? myunicom Linux - General 6 09-24-2003 08:15 AM

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

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