Error = Shmget Permission Denied
and SafetyAsset NetworkAsset Operations and MaintenanceCommerceOverviewSubscription Billing and Revenue ManagementMaster Data Management for CommerceOmnichannel CommerceFinanceOverviewAccounting and Financial CloseCollaborative Finance OperationsEnterprise Risk and ComplianceFinancial Planning and AnalysisTreasury and Financial Risk ManagementHuman ResourcesOverviewCore Human Resources and PayrollHuman Capital AnalyticsTalent ManagementTime and Attendance ManagementManufacturingOverviewManufacturing NetworkManufacturing OperationsResponsive ManufacturingMarketingOverviewMarket with Speed and AgilityUnique Customer ExperiencesReal-Time Customer InsightsR&D/EngineeringOverviewDesign NetworkDesign OrchestrationProject and Portfolio ManagementSalesOverviewCollaborative Quote to CashSales Force AutomationSales Performance ManagementSelling Through Contact CentersServiceOverviewEfficient Field Service ManagementOmnichannel Customer ServiceTransparent Service Process and OperationsSourcing and ProcurementOverviewContingent Workforce ManagementDirect ProcurementSelf-Service ProcurementServices ProcurementStrategic Sourcing and Supplier ManagementSupply ChainOverviewDemand ManagementDemand NetworkLogistics NetworkManufacturing Planning and SchedulingResponse NetworkResponse and Supply ManagementSales, Inventory, and Operations PlanningTransportation ManagementWarehouse ManagementSustainabilityOverviewEnvironment, Health, and SafetyProduct Safety and Stewardship NetworkBrowse by IndustryAerospace and DefenseAutomotiveBankingChemicalsConsumer ProductsDefense and SecurityEngineering, Construction, and OperationsHealthcareHigh TechHigher Education and ResearchIndustrial Machinery and ComponentsInsuranceLife SciencesMediaMill ProductsMiningOil and GasProfessional ServicesPublic SectorRetailSports and EntertainmentTelecommunicationsTravel and TransportationUtilitiesWholesale DistributionBrowse Platform and TechnologyAnalyticsOverviewBusiness IntelligencePredictive AnalyticsGovernance, Risk, and ComplianceEnterprise Performance ManagementApplication Platform and InfrastructureOverviewApplication PlatformContent and CollaborationInterface ManagementProcess Management and IntegrationData ManagementOverviewBig Data on HadoopData WarehousingDatabase ManagementEnterprise Information ManagementIT ManagementOverviewApplication Lifecycle ManagementIT Infrastructure ManagementSe
Q&A Tutorials Poetry RecentThreads NewestNodes Donate What'sNew on Jan 16, 2009 at 07:31UTC ( #736760=perlquestion: print w/replies, xml ) Need Help?? katharnakh has asked for the wisdom of the Perl Monks concerning the following question: Hi, I have a simple script to test variable sharing between two perl processes, use IPC::Shareable; $robj = {status=>'init'}; tie $robj->{status}, 'IPC::Shareable', 'data_glue', {create => 1, mode => 664, destroy => 1}; $pid = fork(); unless(defined $pid){ print "Error durigng fork\n"; } if($pid){ $robj->{parent=>'parent'}; }else{ tie $robj->{status}, 'IPC::Shareable', 'data_glue', {create => https://scn.sap.com/thread/961086 0, mode => 664, destroy => 0}; $robj->{status} = 'updated'; sleep(5); exit(0); } print "\n", $robj->{status}, "\n"; [download] When i run i get following error. IPC::Shareable::SharedMem: shmget: Permission denied at /usr/lib/perl5/site_perl/5.8.3/IPC/Shareable.pm line 566 Could not create shared memory segment: at test_ipc_shareable.pl line 3 [download] Problem: I get above error when run as user http://www.perlmonks.org/?node_id=736760 account other than 'root' . But the script used to work before, but started throwing this error, after server where this script runs was down due to storage corruption. I am getting this error after server came online. I am using perl v5.8.3 and IPC::Shareable v0.60. I tried reinstalling the package, using cpan shell, force make IPC::Shareable', but the unfortunately 'test IPC::Shareable' fails. Does any one know how to resolve this? Because running as 'root' creates other problems for my main scripts. Thanks in advance, katharnakhComment on IPC::Shareable::SharedMem: shmget: Permission deniedSelect or Download Code Replies are listed 'Best First'. Re: IPC::Shareable::SharedMem: shmget: Permission denied by tilly (Archbishop) on Jan 16, 2009 at 08:04UTC My guess is that after the reboot the shared memory segment was somehow created by root and not cleaned up. Now when you try to run the scripts as anything else, they try to access the existing one and fail to have permission because that seg
Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. Search Forums Show Threads Show Posts Tag Search Advanced Search Unanswered Threads Find All Thanked http://www.unix.com/hp-ux/19093-shmat-permission-denied-whats.html Posts Go to Page... linux operating commands and unix operating commands shmat() permission denied, what's this? HP-UX Thread Tools Search this Thread Display Modes http://www.tldp.org/LDP/lpg/node69.html #1 05-30-2005 km4hr Registered User Join Date: May 2005 Last Activity: 31 May 2005, 8:14 AM EDT Posts: 2 Thanks: 0 Thanked 0 Times in 0 Posts shmat() permission error = denied, what's this? I have installed an application that runs correctly for root but not other users. The application generates an error that indicates users don't have permission to attach to shared memory. A daemon process creates the shared memory segment. I've checked every permission I can think of but nothing seems to work. The same application runs properly on an identical system (ie identical error = shmget OS and hardware). This is an area I know little about so I don't know how to troubleshoot. Is there a way to view shared memory information so that I can see what permission users need? xyz Remove advertisements Sponsored Links km4hr View Public Profile Find all posts by km4hr #2 05-30-2005 Perderabo Unix Daemon (Administrator Emeritus) Join Date: Aug 2001 Last Activity: 26 February 2016, 12:31 PM EST Location: Ashburn, Virginia Posts: 9,931 Thanks: 64 Thanked 462 Times in 267 Posts Try: ipcs -m Remove advertisements Sponsored Links Perderabo View Public Profile Find all posts by Perderabo #3 05-30-2005 km4hr Registered User Join Date: May 2005 Last Activity: 31 May 2005, 8:14 AM EDT Posts: 2 Thanks: 0 Thanked 0 Times in 0 Posts thanks perderabo, that's the boost I needed to get me over the hump. when the daemon process was first started on the system it's executable file had the wrong group designation. I changed the group of the file and restarted the daemon. However "ipcs -m" showed that the deamon memory segment group didn't change. Furthermore, I noticed the segment
int shmget ( key_t key, int size, int shmflg ); RETURNS: shared memory segment identifier on success -1 on error: errno = EINVAL (Invalid segment size specified) EEXIST (Segment exists, cannot create) EIDRM (Segment is marked for deletion, or was removed) ENOENT (Segment does not exist) EACCES (Permission denied) ENOMEM (Not enough memory to create segment) NOTES: This particular call should almost seem like old news at this point. It is strikingly similar to the corresponding get calls for message queues and semaphore sets. The first argument to shmget() is the key value (in our case returned by a call to ftok()). This key value is then compared to existing key values that exist within the kernel for other shared memory segments. At that point, the open or access operation is dependent upon the contents of the shmflg argument. IPC_CREAT Create the segment if it doesn't already exist in the kernel. IPC_EXCL When used with IPC_CREAT, fail if segment already exists. If IPC_CREAT is used alone, shmget() either returns the segment identifier for a newly created segment, or returns the identifier for a segment which exists with the same key value. If IPC_EXCL is used along with IPC_CREAT, then either a new segment is created, or if the segment exists, the call fails with -1. IPC_EXCL is useless by itself, but when combined with IPC_CREAT, it can be used as a facility to guarantee that no existing segment is opened for access. Once again, an optional octal mode may be OR'd into the mask. Let's create a wrapper function for locating or creating a shared memory segment : int open_segment( key_t keyval, int segsize ) { int shmid; if((shmid = shmget( keyval, segsize, IPC_CREAT | 0660 )) == -1) { return(-1); } return(shmid); } Note the use of the explicit permissions of 0