Why is it denying me permission?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Why is it denying me permission?
# 1  
Old 04-23-2009
Why is it denying me permission?

I have created a file and set the permission to read and write only for user and group. Here is how I did it:

chmod filename 660

I used ls -l to see and the changes are right so, why is it saying permission denied when I try to change into it. When I type cd filename, I am told permission denied. Why?
# 2  
Old 04-23-2009
Directories need execute permissions.
Try...
chmod 770 dirname
# 3  
Old 04-23-2009
Quote:
Originally Posted by #moveon
I have created a file and set the permission to read and write only for user and group. Here is how I did it:

chmod filename 660

I used ls -l to see and the changes are right so, why is it saying permission denied when I try to change into it. When I type cd filename, I am told permission denied. Why?
the correct syntax is
chmod 660 filename

also, make sure you(user) is the owner or belong to the group of the filename.


cheers,
Devaraj Takhellambam
# 4  
Old 04-23-2009
access permissions take a different meaning for directories. Here's what they mean:

• Read determines if a user can view the directory's contents, i.e. do ls in it.
• Write determines if a user can create new files or delete file in the directory. (Note here that this essentially means that a user with write access to a directory can delete files in the directory even if he/she doesn't have write permissions for the file! So be careful with this.)
• eXecute determines if the user can cd into the directory.
To be safe you should keep R and X together on directories.


in your case you have no "X" and so cant CD into the directory.
# 5  
Old 04-23-2009
Yeah I tried with execution, even 700 it works. But I don't understand because this is homework given us by the teacher and unless it is a mistake, it is stated clearly that we should create three directories and then change their permission to read and write only for user and group. And then they said we should change to one of the directories. Maybe it was a mistake?
# 6  
Old 04-23-2009
Quote:
Originally Posted by devtakh
the correct syntax is
chmod 660 filename

also, make sure you(user) is the owner or belong to the group of the filename.


cheers,
Devaraj Takhellambam
Sorry, my mistake but I wrote it as chmod 660 filename. And yes, the PC belongs to me.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

really need help with permission changes

I dont understand why permission changes are being such a pain in the bum even after I manually changed them through properties....Anyone know what to do here because even thoguh in properties the permissions make me local admin over in the Cygwin its not working.. ... (5 Replies)
Discussion started by: okhawaja
5 Replies

2. UNIX for Dummies Questions & Answers

Permission

Hello Whenever we want to oen any type of file by name, we must have execute perm. in each dir. mentioned in the name. I changed the dir permission using chmod to test the validity of this statement. but i still can open the file ------- any guides would be appreciable (2 Replies)
Discussion started by: dr_mabuse
2 Replies

3. Ubuntu

Permission (I Think)

Pictures by worthamtx - Photobucket The URL is graphic view my present concern. Old partition working great sdb1 both appear on nautilus, both deliver icons to desk top. Based on the label handling of gparted results I tried following with success sudo mkdir /media/disk/data sudo chown... (1 Reply)
Discussion started by: 77yrold
1 Replies

4. Shell Programming and Scripting

help with user permission

hi everyone. iīve been burning my head for a week now with this problem and i couldnīt find a solution. iīve been looking for an answer in this forum but nothing either. so i decided to ask. the thing is, i want to create a users with permission to kill just a group of users. i know how to write... (6 Replies)
Discussion started by: lucasmarin
6 Replies

5. AIX

Denying IPaddress for Multiple Failed Login Attempts

Hi. I would like to be able to deny IP address for too many failed login attemps (either from ssh, sftp, ftp, etc). The system I wish this to work on is an AIX 5.1 system. I'm new to AIX but I'm a linux user. There is a program for linux called fail2ban which reads from the log files and see if... (1 Reply)
Discussion started by: metzgerh
1 Replies

6. Shell Programming and Scripting

access permission

hi, I have an account (i.e. abc) which is set up to sftp files from server A to server B; on server B, I have an account (i.e. def) which I use to perform various operation which include invoke certain scripts to execute my java programs. These programs use the files received from server... (2 Replies)
Discussion started by: mpang_
2 Replies

7. UNIX for Dummies Questions & Answers

Permission?

What does the following permission indicate? -rwSr----- 1 oracle dba 1536 Nov 7 17:05 orapwRTMDB Thanks, Rahul. (1 Reply)
Discussion started by: rahulrathod
1 Replies

8. UNIX for Dummies Questions & Answers

permission

Is it possible to set owner to a group? I need to have a group own a process, because there will be 3 diffrent persons that will start and stop this process. They can not use the same users cause och back logging. we need to know who end when a certian user start/stops processes. (1 Reply)
Discussion started by: dozy
1 Replies

9. UNIX for Dummies Questions & Answers

permission help

Ok heres the situation I've been studying Solaris 8 for about 6 months now and some things click in my head but others don't. One of the things that don't click are file permissions. For example I login at work and I use the ls -l command to get a long listing of the files w/ the permissions.... (2 Replies)
Discussion started by: eloquent99
2 Replies

10. UNIX for Dummies Questions & Answers

su permission

Hi Forums, It seems to me that I can't use "su" command. When I type "su", I get the following message: /sbin/su - Permission denied Am I missing any thing? By the way I am using IRIX6.5 on a SGI computer. Many thanks in advance for your help. Cheers, Siavoush (12 Replies)
Discussion started by: siavoush
12 Replies
Login or Register to Ask a Question