permissions

Hook perm for more than one content type

Drupal 6.x I have this module that manages four different content types. For that matter, how do I define permission for each content within the same module? Is that even possible? I can't figure out how to define permission for each content type cuz hook_perm has to be named with module name and it doesn't have any argument(like hook_a...

What is the efficient way to make a permission system?

Currently im just using something like: in the DB Table: access: home,register,login and then in each page: if(!Functions::has_rights('content')) { Functions::noAccess(); } is there more efficient way to do it, php & MySQL? i may want to gain access even to several parts a page, for example: user can read a page, but doesnt ...

Command Line PHP with shell_exec works for root but not others

I have a very simple script that is to test if running a shell_exec (or backtick operator) basically works: #!/usr/bin/php5 <?php echo "This is a PHP script\n"; echo `ls -l /home/stoysnet/`; Unless I run this as root, it always gives me: $ ./foo.php This is a PHP script Warning: _shell_exec(): Permission Denied in /home/stoysnet/f...

SQL Server: is ther a way to grant execute using GUI

Is there a way to grant execute permissions for a role or a user using GUI (not T-SQL)? I'm using SQL Server 2008 SP1. ...

Why wouldn't an S3 ACL "stick"?

We would like to set an ACL to allow access to one of our buckets with a partner account. We've tested the process on a test account and everything works fine. On our production account/buckets, however, we can set the ACL and see the update but as soon as we attempt to access the bucket from the other account we get a forbidden response...

Live Mesh has screwed up my file permissions

I got the bright idea of using Live Mesh to sync up my development directories between my laptop and desktop machines. It appears that the permission on any new files that are added through Live Mesh do not inherit permissions from the parent directory. Now I cannot overwrite the permissions on those files. I keep getting an "Access i...

How to determine what user and group a Python script is running as?

I have a CGI script that is getting an "IOError: [Errno 13] Permission denied" error in the stack trace in the web server's error log. As part of debugging this problem, I'd like to add a little bit of code to the script to print the user and (especially) group that the script is running as, into the error log (presumably STDERR). I kn...

Iphone - cannot grant permission for publishing on a Facebook page that i administer

I want to open a dialog on the IPhone so a user can grant my application permission to post on a Facebook page that the user administers. Following the docs, I can grant permissions for the user's stream and I can even post on a page that he is a fan of. However, the post on the page is listed as from the username, not on behalf of the ...

PHP: Copying file permissions with fileperms and ftp_chmod

The overall goal: Copy the permissions of files from the local filesystem when uploading them over FTP using PHP. The problem: While ftp_chmod appears to succeed, and according to the print statement in the code I'm setting the right permissions, it sets completely wrong permissions. The code: $perms = fileperms($src); if ($perms !==...

How to set file permission for linux host under windows ?

For example, i want a file has permission of 644 automatically when i uploaded it to my linux host, before upload, it is under windows. How could i do this? Btw, i use Filezilla for upload Updated: Before post this question, actually, i ever thought it is impossible too. But, as i has many wordpress sites, i remembered that i never nee...

SSH Chown problems

I have a webserver with multiple domain and user accounts setup. Recently I renamed one of the domain names and changed it's username correspondingly. However, this new user cannot access the data from the domain because it does not have the required permissions. How can I solve this problem? I've tried chown and I still cannot get acce...

SSH copying folders

I have a folder on my server that I'd like to copy to another directory. However, after I copy it and navigate to the new folder, some of the directories are RED and I can't navigate into them. I think this has something to do with them creating links instead of actually copying the folders. cp -a site2.com/httpdocs site1.com/httpdocs ...

Daemon running as user nobody needs to copy file from Desktop

I have a daemon that is running as user nobody. It needs to copy a file that I specify into /Users/Shared/MyFolder If I tell it to copy a file that is already in /Users/Shared/ it works fine. If I tell it to copy it from somewhere in my home directory like the desktop, the copy fails. I'm using NSFileManager copyPath:toPath: Any ideas? ...

Access to a oracle Database

I have created a database in Oracle. Say "TEMP" is the name of the database created. I have created a user DWH. Now I would like to grant access to TEMP for the user DWH. How shall i do? ...

Joomla - Warning! Failed to move file error

Hi Guys, I have found some solutions to this error and tried implementing them but none of which has worked and hope that some here at SO might have a different answer. I get this error, "Warning! Failed to move file" when I try install modules into my new installation of Joomla here: http://sun-eng.sixfoot.co.za Here's some solution...

php lampp permissions of fopen function

hi i'm programming php using: netbeans 6.8 lampp for ubuntu (xampp) apache which came with xampp $fh = fopen("testfile2.txt", 'w') or die("Failed to create file"); $text ="hello man cool good"; fwrite($fh, $text) or die("Could not write to file"); fclose($fh); echo "File 'testfile.txt' written successfully"; //i...

SharePoint Permissions: User with Contribute change cannot change a list item they did not create?

I've build a custom SharePoint list that programatically adjusts permissions per list item. This part of the app works by clearing all permissions in the list item and adding permissions to the folks I want to grant Read or Contribute permission to. I believe this part of the application to be correct: selecting Manage Permissions on a...

Can I get per folder/per document permission on SharePoint Team Services (Agile)?

Hi The SharePoint site that comes with my TFS installation (MSF for Agile) only allows me to set site-wide permissions. I have used sub-sites to go around this problem temporarily but would want to change permissions per folder and even per document within the same site. Is there any reason why I can't do this in the team site? I know y...

How to transfer url parameters to repoze custom predicate checkers

I would like to create a repoze custom predicate checker that is capable to access url parameters and validate something. But I would like to use allow_only to set this permission checker in all the controller's scope. Something like: class MyController(BaseController): allow_only = All(not_anonymous(msg=l_(u'You must be logged on'...

SharePoint copy permissions of Domain Group to SharePoint Group, WSS 3.0?

Is there a way to copy the permissions of a Domain Group to a SharePoint Group in WSS 3.0? Where both groups have the same exact permissions including the Limited Access role definition. I have tried to copy permissions programatically but can't get the Limited Access to be assigned on some objects (website, list, and list items). My p...