LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-26-2007, 03:45 AM   #1
mahabooba
Member
 
Registered: Dec 2005
Posts: 43

Rep: Reputation: 15
File permission


Hi,

The default permission for a file is 644(rw-r--r--) with umask value 022 .
But How to create a "file" with default permissions 777(rwxrwxrwx) similar to Directories.

Please help me in this regards.

Thanks in advance,

Ali
 
Old 03-26-2007, 03:50 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can use the chmod command to change the permissions on a file. You can alter your umask MODE in your ~/.profile script but I wouldn't recommend that particular value. Also, an 'x' permission bit on a file is different than on directories. 'x' on files mark them as executable. 'x' on directories mean that you can enter them.
 
Old 03-26-2007, 04:41 AM   #3
mahabooba
Member
 
Registered: Dec 2005
Posts: 43

Original Poster
Rep: Reputation: 15
Hi All,
Without using the chmod command ,How we can create a file having 777 permission by default. It means while creating a file, permissions should be 777(rwxrwxrwx) rather than 644(rw-r--r-- of umask=022).

With umask=000 in /etc/bashrc, I am able to create a file with 666 permissions by default. But How I can get 777 permission by default for a file.

Please help me in this critical issue.

Thanks and Regards,
Ali
 
Old 03-26-2007, 05:34 AM   #4
anupamsr
Member
 
Registered: Sep 2004
Location: India
Distribution: Kubuntu, Archlinux, Suse, Gentoo, Mandrake
Posts: 371

Rep: Reputation: 30
http://www.lifeaftercoffee.com/2007/...g-a-file-mask/

Hope this helps
 
  


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
Changing file permission, How to edit a file? rainchild Linux - Newbie 8 01-14-2007 10:18 PM
change file permission of a mouse device file permanently alexandre_fs Linux - General 5 01-09-2007 06:30 AM
file permission ikramgift Programming 1 12-29-2006 04:09 AM
About the file permission ust Linux - Distributions 1 05-06-2005 03:05 AM
file permission jh31480 Linux - Newbie 2 01-25-2005 06:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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